curve: minor: fix typo in variable
authorDaniel Borkmann <dborkman@redhat.com>
Sat, 15 Jun 2013 17:46:13 +0000 (15 19:46 +0200)
committerDaniel Borkmann <dborkman@redhat.com>
Sat, 15 Jun 2013 17:46:40 +0000 (15 19:46 +0200)
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
curve.c
curve.h

diff --git a/curve.c b/curve.c
index 1064f3c..ef1367c 100644 (file)
--- 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 aa159e8..d9c2584 100644 (file)
--- 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);