mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
ARM NEON Salsa20/12.
This commit is contained in:
parent
bc61357a44
commit
8e1ac9fb0c
4 changed files with 2257 additions and 0 deletions
6
ext/arm32-neon-salsa2012-asm/README.md
Normal file
6
ext/arm32-neon-salsa2012-asm/README.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
ARM NEON (32-bit) ASM implementation of Salsa20/12
|
||||||
|
======
|
||||||
|
|
||||||
|
This is from [supercop](http://bench.cr.yp.to/supercop.html) and was originally written by Daniel J. Bernstein. Code is in the public domain like the rest of Salsa20. It's much faster than the naive implementation.
|
||||||
|
|
||||||
|
It's included automatically in 32-bit Linux ARM builds. It likely will not work on 64-bit ARM, so it'll need to be ported at least. That will unfortunately keep it out of mobile versions for now since those are all going 64-bit.
|
15
ext/arm32-neon-salsa2012-asm/salsa2012.h
Normal file
15
ext/arm32-neon-salsa2012-asm/salsa2012.h
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#ifndef ZT_SALSA2012_ARM32NEON_ASM
|
||||||
|
#define ZT_SALSA2012_ARM32NEON_ASM
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ciphertext buffer, message/NULL, length, nonce (8 bytes), key (32 bytes)
|
||||||
|
extern int zt_salsa2012_armneon3_xor(unsigned char *c,const unsigned char *m,unsigned long long len,const unsigned char *n,const unsigned char *k);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
2231
ext/arm32-neon-salsa2012-asm/salsa2012.s
Normal file
2231
ext/arm32-neon-salsa2012-asm/salsa2012.s
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,6 @@
|
||||||
|
#ifndef ZT_X64_SALSA2012_ASM
|
||||||
|
#define ZT_X64_SALSA2012_ASM
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -9,3 +12,5 @@ extern int zt_salsa2012_amd64_xmm6(unsigned char *, unsigned long long, const un
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue