diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-06-15 19:46:13 +0200 |
---|---|---|
committer | Daniel Borkmann <dborkman@redhat.com> | 2013-06-15 19:46:40 +0200 |
commit | 46c1979e8acff1747137d4206f9f09e38d48e231 (patch) | |
tree | 4b5e934bcb30cc23d840c7cbdc26879f432a9390 | |
parent | f03b8d19313323bf66c48cb9c75c0394705686b6 (diff) |
curve: minor: fix typo in variable
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
-rw-r--r-- | curve.c | 12 | ||||
-rw-r--r-- | curve.h | 4 |
2 files changed, 8 insertions, 8 deletions
@@ -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; @@ -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); |