mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-21 05:43:59 -07:00
Use X64 ASM ed25519 signatures on Linux/x64, which are about 10X faster. Will matter a lot for network controllers, not so much for other things.
This commit is contained in:
parent
a59912f3af
commit
beb170e4fb
68 changed files with 37123 additions and 68 deletions
16
ext/ed25519-amd64-asm/hram.c
Normal file
16
ext/ed25519-amd64-asm/hram.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*#include "crypto_hash_sha512.h"*/
|
||||
#include "hram.h"
|
||||
|
||||
extern void ZT_sha512internal(void *digest,const void *data,unsigned int len);
|
||||
|
||||
void get_hram(unsigned char *hram, const unsigned char *sm, const unsigned char *pk, unsigned char *playground, unsigned long long smlen)
|
||||
{
|
||||
unsigned long long i;
|
||||
|
||||
for (i = 0;i < 32;++i) playground[i] = sm[i];
|
||||
for (i = 32;i < 64;++i) playground[i] = pk[i-32];
|
||||
for (i = 64;i < smlen;++i) playground[i] = sm[i];
|
||||
|
||||
/*crypto_hash_sha512(hram,playground,smlen);*/
|
||||
ZT_sha512internal(hram,playground,smlen);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue