~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
math/Makefile.am, symm/Makefile.am: Use `--no-install' on oddball tests.
[catacomb]
/
symm
/
chacha.c
diff --git
a/symm/chacha.c
b/symm/chacha.c
index
655ecd0
..
7152200
100644
(file)
--- a/
symm/chacha.c
+++ b/
symm/chacha.c
@@
-78,6
+78,10
@@
extern core__functype chacha_core_x86ish_sse2;
extern core__functype chacha_core_arm_neon;
#endif
extern core__functype chacha_core_arm_neon;
#endif
+#if CPUFAM_ARM64
+extern core__functype chacha_core_arm64;
+#endif
+
static core__functype *pick_core(void)
{
#if CPUFAM_X86 || CPUFAM_AMD64
static core__functype *pick_core(void)
{
#if CPUFAM_X86 || CPUFAM_AMD64
@@
-88,6
+92,9
@@
static core__functype *pick_core(void)
DISPATCH_PICK_COND(chacha_core, chacha_core_arm_neon,
cpu_feature_p(CPUFEAT_ARM_NEON));
#endif
DISPATCH_PICK_COND(chacha_core, chacha_core_arm_neon,
cpu_feature_p(CPUFEAT_ARM_NEON));
#endif
+#if CPUFAM_ARM64
+ DISPATCH_PICK_COND(chacha_core, chacha_core_arm64, 1);
+#endif
DISPATCH_PICK_FALLBACK(chacha_core, simple_core);
}
DISPATCH_PICK_FALLBACK(chacha_core, simple_core);
}
@@
-583,7
+590,7
@@
CHACHA_VARS(DEFGCIPHER)
\
const gccipher xchacha##r = { \
"xchacha" #r, chacha_keysz, \
\
const gccipher xchacha##r = { \
"xchacha" #r, chacha_keysz, \
-
CHACHA_NONCESZ, gxinit_##r
\
+
XCHACHA_NONCESZ, gxinit_##r
\
};
CHACHA_VARS(DEFGXCIPHER)
};
CHACHA_VARS(DEFGXCIPHER)
@@
-747,7
+754,7
@@
static grand *grinit(const void *k, size_t ksz, const void *n,
g->r.r.ops = ops;
g->r.ops = myops;
chacha_init(&g->ctx, k, ksz, 0);
g->r.r.ops = ops;
g->r.ops = myops;
chacha_init(&g->ctx, k, ksz, 0);
- myops->setnonce(g, n);
+
if (n)
myops->setnonce(g, n);
return (&g->r.r);
}
return (&g->r.r);
}