Page MenuHomeFreeBSD

D33485.diff
No OneTemporary

D33485.diff

diff --git a/sys/opencrypto/cryptodev.h b/sys/opencrypto/cryptodev.h
--- a/sys/opencrypto/cryptodev.h
+++ b/sys/opencrypto/cryptodev.h
@@ -95,6 +95,7 @@
#define SHA2_256_BLOCK_LEN 64
#define SHA2_384_BLOCK_LEN 128
#define SHA2_512_BLOCK_LEN 128
+#define POLY1305_BLOCK_LEN 16
/* HMAC values */
#define NULL_HMAC_BLOCK_LEN 64
diff --git a/sys/opencrypto/xform_poly1305.c b/sys/opencrypto/xform_poly1305.c
--- a/sys/opencrypto/xform_poly1305.c
+++ b/sys/opencrypto/xform_poly1305.c
@@ -14,6 +14,7 @@
CTASSERT(POLY1305_KEY_LEN == crypto_onetimeauth_poly1305_KEYBYTES);
CTASSERT(POLY1305_HASH_LEN == crypto_onetimeauth_poly1305_BYTES);
+CTASSERT(POLY1305_BLOCK_LEN == crypto_onetimeauth_poly1305_BYTES);
static void
xform_Poly1305_Init(void *polyctx)
@@ -64,7 +65,7 @@
.keysize = POLY1305_KEY_LEN,
.hashsize = POLY1305_HASH_LEN,
.ctxsize = sizeof(struct poly1305_xform_ctx),
- .blocksize = crypto_onetimeauth_poly1305_BYTES,
+ .blocksize = POLY1305_BLOCK_LEN,
.Init = xform_Poly1305_Init,
.Setkey = xform_Poly1305_Setkey,
.Update = xform_Poly1305_Update,

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 12:42 PM (22 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14697831
Default Alt Text
D33485.diff (1 KB)

Event Timeline