You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			15 lines
		
	
	
		
			225 B
		
	
	
	
		
			C
		
	
		
		
			
		
	
	
			15 lines
		
	
	
		
			225 B
		
	
	
	
		
			C
		
	
| 
								 
											11 years ago
										 
									 | 
							
								#include "ge.h"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								void ge_tobytes(unsigned char *s,const ge_p2 *h)
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								  fe recip;
							 | 
						||
| 
								 | 
							
								  fe x;
							 | 
						||
| 
								 | 
							
								  fe y;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  fe_invert(recip,h->Z);
							 | 
						||
| 
								 | 
							
								  fe_mul(x,h->X,recip);
							 | 
						||
| 
								 | 
							
								  fe_mul(y,h->Y,recip);
							 | 
						||
| 
								 | 
							
								  fe_tobytes(s,y);
							 | 
						||
| 
								 | 
							
								  s[31] ^= fe_isnegative(x) << 7;
							 | 
						||
| 
								 | 
							
								}
							 |