Skip to content

Commit c210f24

Browse files
committed
IV is short for 'initialization vector'
1 parent fff9fee commit c210f24

20 files changed

Lines changed: 57 additions & 57 deletions

doc/crypt.tex

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ \subsection{Notes}
781781
\subsection{Background}
782782
A typical symmetric block cipher can be used in chaining modes to effectively encrypt messages larger than the block
783783
size of the cipher. Given a key $k$, a plaintext $P$ and a cipher $E$ we shall denote the encryption of the block
784-
$P$ under the key $k$ as $E_k(P)$. In some modes there exists an initial vector denoted as $C_{-1}$.
784+
$P$ under the key $k$ as $E_k(P)$. In some modes there exists an initialization vector denoted as $C_{-1}$.
785785

786786
\subsubsection{ECB Mode}
787787
\index{ECB mode}
@@ -799,19 +799,19 @@ \subsubsection{CBC Mode}
799799
\begin{equation}
800800
C_i = E_k(P_i \oplus C_{i - 1})
801801
\end{equation}
802-
It is important that the initial vector be unique and preferably random for each message encrypted under the same key.
802+
It is important that the initialization vector be unique and preferably random for each message encrypted under the same key.
803803

804804
\subsubsection{CTR Mode}
805805
\index{CTR mode}
806-
CTR or Counter Mode is a mode which only uses the encryption function of the cipher. Given a initial vector which is
806+
CTR or Counter Mode is a mode which only uses the encryption function of the cipher. Given a initialization vector which is
807807
treated as a large binary counter the CTR mode is given as:
808808
\begin{eqnarray}
809809
C_{-1} = C_{-1} + 1\mbox{ }(\mbox{mod }2^W) \nonumber \\
810810
C_i = P_i \oplus E_k(C_{-1})
811811
\end{eqnarray}
812-
Where $W$ is the size of a block in bits (e.g. 64 for Blowfish). As long as the initial vector is random for each message
812+
Where $W$ is the size of a block in bits (e.g. 64 for Blowfish). As long as the initialization vector is random for each message
813813
encrypted under the same key replay and swap attacks are infeasible. CTR mode may look simple but it is as secure
814-
as the block cipher is under a chosen plaintext attack (provided the initial vector is unique).
814+
as the block cipher is under a chosen plaintext attack (provided the initialization vector is unique).
815815

816816
\subsubsection{CFB Mode}
817817
\index{CFB mode}
@@ -822,7 +822,7 @@ \subsubsection{CFB Mode}
822822
\end{eqnarray}
823823
Note that in this library the output feedback width is equal to the size of the block cipher. That is this mode is used
824824
to encrypt whole blocks at a time. However, the library will buffer data allowing the user to encrypt or decrypt partial
825-
blocks without a delay. When this mode is first setup it will initially encrypt the initial vector as required.
825+
blocks without a delay. When this mode is first setup it will initially encrypt the initialization vector as required.
826826

827827
\subsubsection{OFB Mode}
828828
\index{OFB mode}
@@ -1012,7 +1012,7 @@ \subsection{Examples}
10121012
/* start up CTR mode */
10131013
if ((err = ctr_start(
10141014
find_cipher("twofish"), /* index of desired cipher */
1015-
IV, /* the initial vector */
1015+
IV, /* the initialization vector */
10161016
key, /* the secret key */
10171017
16, /* length of secret key (16 bytes) */
10181018
0, /* 0 == default # of rounds */
@@ -1786,7 +1786,7 @@ \subsection{Initialization}
17861786
as \textit{aadlen}.
17871787

17881788
\subsection{Nonce Vector}
1789-
After the state has been initialized (or reset) the next step is to add the session (or packet) initial vector. It should be unique per packet encrypted.
1789+
After the state has been initialized (or reset) the next step is to add the session (or packet) initialization vector. It should be unique per packet encrypted.
17901790

17911791
\index{ccm\_add\_nonce()}
17921792
\begin{verbatim}
@@ -1973,7 +1973,7 @@ \subsection{Example Usage}
19731973
however, unlike EAX it cannot accept \textit{additional authentication data} (meta--data) after plaintext has been processed. This mode also only works with
19741974
block ciphers with a 16--byte block.
19751975

1976-
A GCM stream is meant to be processed in three modes, one after another. First, the initial vector (per session) data is processed. This should be
1976+
A GCM stream is meant to be processed in three modes, one after another. First, the initialization vector (per session) data is processed. This should be
19771977
unique to every session. Next, the the optional additional authentication data is processed, and finally the plaintext (or ciphertext depending on the direction).
19781978

19791979
\subsection{Initialization}
@@ -1989,16 +1989,16 @@ \subsection{Initialization}
19891989
This initializes the GCM state \textit{gcm} for the given cipher indexed by \textit{cipher}, with a secret key \textit{key} of length \textit{keylen} octets. The cipher
19901990
chosen must have a 16--byte block size (e.g., AES).
19911991

1992-
\subsection{Initial Vector}
1993-
After the state has been initialized (or reset) the next step is to add the session (or packet) initial vector. It should be unique per packet encrypted.
1992+
\subsection{Initialization Vector}
1993+
After the state has been initialized (or reset) the next step is to add the session (or packet) initialization vector. It should be unique per packet encrypted.
19941994

19951995
\index{gcm\_add\_iv()}
19961996
\begin{verbatim}
19971997
int gcm_add_iv( gcm_state *gcm,
19981998
const unsigned char *IV,
19991999
unsigned long IVlen);
20002000
\end{verbatim}
2001-
This adds the initial vector octets from \textit{IV} of length \textit{IVlen} to the GCM state \textit{gcm}. You can call this function as many times as required
2001+
This adds the initialization vector octets from \textit{IV} of length \textit{IVlen} to the GCM state \textit{gcm}. You can call this function as many times as required
20022002
to process the entire IV.
20032003

20042004
Note: the GCM protocols provides a \textit{shortcut} for 12--byte IVs where no pre-processing is to be done. If you want to minimize per packet latency it is ideal
@@ -2193,16 +2193,16 @@ \subsection{Initialization}
21932193
This initializes the ChaCha20--Poly1305 state \textit{st} with a secret key \textit{key} of length \textit{keylen}
21942194
octets (valid lengths: 32 or 16).
21952195

2196-
\subsection{Initial Vector}
2197-
After the state has been initialized the next step is to add the initial vector.
2196+
\subsection{Initialization Vector}
2197+
After the state has been initialized the next step is to add the initialization vector.
21982198

21992199
\index{chacha20poly1305\_setiv()}
22002200
\begin{verbatim}
22012201
int chacha20poly1305_setiv(chacha20poly1305_state *st,
22022202
const unsigned char *iv,
22032203
unsigned long ivlen);
22042204
\end{verbatim}
2205-
This adds the initial vector from \textit{iv} of length \textit{ivlen} octects (valid lengths: 8 or 12) to
2205+
This adds the initialization vector from \textit{iv} of length \textit{ivlen} octects (valid lengths: 8 or 12) to
22062206
the ChaCha20--Poly1305 state \textit{st}.
22072207

22082208
\index{chacha20poly1305\_setiv\_rfc7905()}
@@ -2212,7 +2212,7 @@ \subsection{Initial Vector}
22122212
unsigned long ivlen,
22132213
ulong64 sequence_number);
22142214
\end{verbatim}
2215-
This also adds the initial vector from \textit{iv} of length \textit{ivlen} octects (valid lengths: 8 or 12) to
2215+
This also adds the initialization vector from \textit{iv} of length \textit{ivlen} octects (valid lengths: 8 or 12) to
22162216
the state \textit{st} but it also incorporates 64bit \textit{sequence\_number} into IV as described in RFC7905.
22172217

22182218
You can call only one of \textit{chacha20poly1305\_setiv} or \textit{chacha20poly1305\_setiv\_rfc7905}.
@@ -6163,7 +6163,7 @@ \subsection{Algorithm One}
61636163
\subsection{Algorithm Two}
61646164

61656165
Algorithm Two is the recommended algorithm for this task. It allows variable length salts, and can produce outputs larger than the
6166-
hash functions output. As such, it can easily be used to derive session keys for ciphers and MACs as well initial vectors as required
6166+
hash functions output. As such, it can easily be used to derive session keys for ciphers and MACs as well initialization vectors as required
61676167
from a single password and invocation of this algorithm.
61686168

61696169
\index{pkcs\_5\_alg2()}
@@ -7295,8 +7295,8 @@ \chapter{Optimizations}
72957295
/** Accelerated GCM packet (one shot)
72967296
@param key The secret key
72977297
@param keylen The length of the secret key
7298-
@param IV The initial vector
7299-
@param IVlen The length of the initial vector
7298+
@param IV The initialization vector
7299+
@param IVlen The length of the initialization vector
73007300
@param adata The additional authentication data (header)
73017301
@param adatalen The length of the adata
73027302
@param pt The plaintext
@@ -7412,7 +7412,7 @@ \subsubsection{Accelerated ECB}
74127412

74137413
\subsubsection{Accelerated CBC}
74147414
These two functions are meant for accelerated CBC encryption. These functions are accessed through the accel\_cbc\_encrypt and accel\_cbc\_decrypt pointers.
7415-
The \textit{blocks} value is the number of complete blocks to process. The \textit{IV} is the CBC initial vector. It is an input upon calling this function and must be
7415+
The \textit{blocks} value is the number of complete blocks to process. The \textit{IV} is the CBC initialization vector. It is an input upon calling this function and must be
74167416
updated by the function before returning.
74177417

74187418
\subsubsection{Accelerated CTR}

src/encauth/chachapoly/chacha20poly1305_memory.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
Process an entire GCM packet in one call.
1616
@param key The secret key
1717
@param keylen The length of the secret key
18-
@param iv The initial vector
19-
@param ivlen The length of the initial vector
18+
@param iv The initialization vector
19+
@param ivlen The length of the initialization vector
2020
@param aad The additional authentication data (header)
2121
@param aadlen The length of the aad
2222
@param in The plaintext

src/encauth/gcm/gcm_memory.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
@param cipher Index of cipher to use
2121
@param key The secret key
2222
@param keylen The length of the secret key
23-
@param IV The initial vector
24-
@param IVlen The length of the initial vector
23+
@param IV The initialization vector
24+
@param IVlen The length of the initialization vector
2525
@param adata The additional authentication data (header)
2626
@param adatalen The length of the adata
2727
@param pt The plaintext

src/headers/tomcrypt_cipher.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,8 @@ extern struct ltc_cipher_descriptor {
499499
/** Accelerated GCM packet (one shot)
500500
@param key The secret key
501501
@param keylen The length of the secret key
502-
@param IV The initial vector
503-
@param IVlen The length of the initial vector
502+
@param IV The initialization vector
503+
@param IVlen The length of the initialization vector
504504
@param adata The additional authentication data (header)
505505
@param adatalen The length of the adata
506506
@param pt The plaintext

src/mac/hmac/hmac_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ int hmac_init(hmac_state *hmac, int hash, const unsigned char *key, unsigned lon
7575
zeromem((hmac->key) + keylen, (size_t)(LTC_HMAC_BLOCKSIZE - keylen));
7676
}
7777

78-
/* Create the initial vector for step (3) */
78+
/* Create the initialization vector for step (3) */
7979
for(i=0; i < LTC_HMAC_BLOCKSIZE; i++) {
8080
buf[i] = hmac->key[i] ^ 0x36;
8181
}

src/modes/cbc/cbc_getiv.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
#ifdef LTC_CBC_MODE
1717

1818
/**
19-
Get the current initial vector
20-
@param IV [out] The destination of the initial vector
21-
@param len [in/out] The max size and resulting size of the initial vector
19+
Get the current initialization vector
20+
@param IV [out] The destination of the initialization vector
21+
@param len [in/out] The max size and resulting size of the initialization vector
2222
@param cbc The CBC state
2323
@return CRYPT_OK if successful
2424
*/

src/modes/cbc/cbc_setiv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#ifdef LTC_CBC_MODE
1818

1919
/**
20-
Set an initial vector
21-
@param IV The initial vector
20+
Set an initialization vector
21+
@param IV The initialization vector
2222
@param len The length of the vector (in octets)
2323
@param cbc The CBC state
2424
@return CRYPT_OK if successful

src/modes/cbc/cbc_start.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/**
1919
Initialize a CBC context
2020
@param cipher The index of the cipher desired
21-
@param IV The initial vector
21+
@param IV The initialization vector
2222
@param key The secret key
2323
@param keylen The length of the secret key (octets)
2424
@param num_rounds Number of rounds in the cipher desired (0 for default)

src/modes/cfb/cfb_getiv.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
#ifdef LTC_CFB_MODE
1717

1818
/**
19-
Get the current initial vector
20-
@param IV [out] The destination of the initial vector
21-
@param len [in/out] The max size and resulting size of the initial vector
19+
Get the current initialization vector
20+
@param IV [out] The destination of the initialization vector
21+
@param len [in/out] The max size and resulting size of the initialization vector
2222
@param cfb The CFB state
2323
@return CRYPT_OK if successful
2424
*/

src/modes/cfb/cfb_setiv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
#ifdef LTC_CFB_MODE
1717

1818
/**
19-
Set an initial vector
20-
@param IV The initial vector
19+
Set an initialization vector
20+
@param IV The initialization vector
2121
@param len The length of the vector (in octets)
2222
@param cfb The CFB state
2323
@return CRYPT_OK if successful

0 commit comments

Comments
 (0)