X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/f9fe99103a13da2d40aac5bd047297096807747f..8851fe49eb5c9112f3bd00e285f9c502dfd0deb3:/symm/chacha.c?ds=sidebyside diff --git a/symm/chacha.c b/symm/chacha.c index 4dcfcef9..43d23dc7 100644 --- a/symm/chacha.c +++ b/symm/chacha.c @@ -218,9 +218,9 @@ unsigned long chacha_tell(chacha_ctx *ctx) { kludge64 i = chacha_tellu64(ctx); return (GET64(unsigned long, i)); } kludge64 chacha_tellu64(chacha_ctx *ctx) - { kludge64 i; SET64(i, ctx->a[9], ctx->a[8]); return (i); } + { kludge64 i; SET64(i, ctx->a[13], ctx->a[12]); return (i); } -/* --- @chacha{,12,8}_encrypt@ --- * +/* --- @chacha{20,12,8}_encrypt@ --- * * * Arguments: @chacha_ctx *ctx@ = pointer to context * @const void *src@ = source buffer (or null) @@ -444,7 +444,7 @@ CHACHA_VARS(DEFXNONCE) * different. */ -/* --- @xchacha{,12,8}_encrypt@ --- * +/* --- @xchacha{20,12,8}_encrypt@ --- * * * Arguments: @xchachaR_ctx *ctx@ = pointer to context * @const void *src@ = source buffer (or null)