From 46c1979e8acff1747137d4206f9f09e38d48e231 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Sat, 15 Jun 2013 19:46:13 +0200 Subject: [PATCH] curve: minor: fix typo in variable Signed-off-by: Daniel Borkmann --- curve.c | 12 ++++++------ curve.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/curve.c b/curve.c index 1064f3ce..ef1367c6 100644 --- a/curve.c +++ b/curve.c @@ -104,7 +104,7 @@ void curve25519_proto_init(struct curve25519_proto *proto, ssize_t curve25519_encode(struct curve25519_struct *curve, struct curve25519_proto *proto, unsigned char *plaintext, size_t size, - unsigned char **chipertext) + unsigned char **ciphertext) { int ret, i; ssize_t done = size; @@ -132,7 +132,7 @@ ssize_t curve25519_encode(struct curve25519_struct *curve, for (i = 0; i < NONCE_RND_LENGTH; ++i) curve->enc[i] = (uint8_t) secrand(); - (*chipertext) = curve->enc; + (*ciphertext) = curve->enc; out: spinlock_unlock(&curve->enc_lock); return done; @@ -140,7 +140,7 @@ out: ssize_t curve25519_decode(struct curve25519_struct *curve, struct curve25519_proto *proto, - unsigned char *chipertext, size_t size, + unsigned char *ciphertext, size_t size, unsigned char **plaintext, struct taia *arrival_taia) { @@ -159,17 +159,17 @@ ssize_t curve25519_decode(struct curve25519_struct *curve, arrival_taia = &tmp_taia; } - taia_unpack(NONCE_PKT_OFFSET(chipertext), &packet_taia); + taia_unpack(NONCE_PKT_OFFSET(ciphertext), &packet_taia); if (taia_looks_good(arrival_taia, &packet_taia) == 0) { done = 0; goto out; } fmemcpy(NONCE_EDN_OFFSET(proto->dnonce), - NONCE_PKT_OFFSET(chipertext), NONCE_LENGTH); + NONCE_PKT_OFFSET(ciphertext), NONCE_LENGTH); fmemset(curve->dec, 0, curve->dec_size); - ret = crypto_box_open_afternm(curve->dec, chipertext, size, + ret = crypto_box_open_afternm(curve->dec, ciphertext, size, proto->dnonce, proto->key); if (unlikely(ret)) { done = -EIO; diff --git a/curve.h b/curve.h index aa159e80..d9c25846 100644 --- a/curve.h +++ b/curve.h @@ -31,10 +31,10 @@ extern int curve25519_pubkey_hexparse_32(unsigned char *bin, size_t blen, extern ssize_t curve25519_encode(struct curve25519_struct *curve, struct curve25519_proto *proto, unsigned char *plaintext, size_t size, - unsigned char **chipertext); + unsigned char **ciphertext); extern ssize_t curve25519_decode(struct curve25519_struct *curve, struct curve25519_proto *proto, - unsigned char *chipertext, size_t size, + unsigned char *ciphertext, size_t size, unsigned char **plaintext, struct taia *arrival_taia); -- 2.11.4.GIT