Home | History | Annotate | Download | only in libtomcrypt

Lines Matching refs:CTR

788 \subsubsection{CTR Mode}
789 \index{CTR mode}
790 CTR or Counter Mode is a mode which only uses the encryption function of the cipher. Given a initial vector which is
791 treated as a large binary counter the CTR mode is given as:
797 encrypted under the same key replay and swap attacks are infeasible. CTR mode may look simple but it is as secure
822 My personal preference is for the CTR mode since it has several key benefits:
830 The CTR, CFB and OFB routines provided allow you to encrypt block sizes that differ from the ciphers block size. They
846 \index{CBC Mode} \index{CTR Mode}
848 The library provides simple support routines for handling CBC, CTR, CFB, OFB and ECB encoded messages. Assuming the mode
850 use that mode. They have identical setup routines (except CTR and ECB mode):
851 \index{ecb\_start()} \index{cfb\_start()} \index{cbc\_start()} \index{ofb\_start()} \index{ctr\_start()}
866 symmetric_CTR *ctr);
883 In the case of CTR mode there is an additional parameter \textit{ctr\_mode} which specifies the mode that the counter is to be used in.
884 If \textbf{CTR\_COUNTER\_ LITTLE\_ENDIAN} was specified then the counter will be treated as a little endian value. Otherwise, if
885 \textbf{CTR\_COUNTER\_BIG\_ENDIAN} was specified the counter will be treated as a big endian value. As of v1.15 the RFC 3686 style of
886 increment then encrypt is also supported. By OR'ing \textbf{LTC\_CTR\_RFC3686} with the CTR \textit{mode} value, ctr\_start() will increment
894 \index{cbc\_encrypt()} \index{cbc\_decrypt()} \index{ofb\_encrypt()} \index{ofb\_decrypt()} \index{ctr\_encrypt()} \index{ctr\_decrypt()}
906 Where \textit{XXX} is one of $\lbrace ecb, cbc, ctr, cfb, ofb \rbrace$.
908 In all cases, \textit{len} is the size of the buffer (as number of octets) to encrypt or decrypt. The CTR, OFB and CFB modes are order sensitive but not
921 \index{ctr\_setiv()} \index{ctr\_getiv()}
939 were the last ciphertext block. In CFB mode, the IV is encrypted as if it were the prior encrypted pad. In CTR mode, the IV is encrypted without
947 \index{ecb\_done()} \index{cbc\_done()}\index{cfb\_done()}\index{ofb\_done()} \index{ctr\_done()}
962 symmetric_CTR ctr;
973 /* start up CTR mode */
981 &ctr) /* where to store the CTR state */
991 &ctr) /* CTR state */
1002 &ctr) /* the ctr state we wish to modify */
1011 &ctr) /* CTR state */
1018 if ((err = ctr_done(&ctr)) != CRYPT_OK) {
1025 zeromem(&ctr, sizeof(ctr));
1098 The F8 Chaining mode (see RFC 3711 for instance) is yet another chaining mode for block ciphers. It behaves much like CTR mode in that it XORs a keystream
1162 CTR and OMAC support and provides encryption and
1163 authentication\footnote{Note that since EAX only requires OMAC and CTR you may use \textit{encrypt only} cipher descriptors with this mode.}.
5247 This mode (auto-detected with x86\_32,x86\_64 platforms with GCC or MSVC) configures various routines such as ctr\_encrypt() or
5257 By design the \textit{fast} mode functions won't get unaligned on their own. For instance, if you call ctr\_encrypt() right after calling
5258 ctr\_start() and all the inputs you gave are aligned than ctr\_encrypt() will perform aligned memory operations only. However, if you
5259 call ctr\_encrypt() with an odd amount of plaintext then call it again the CTR pad (the IV) will be partially used. This will
5260 cause the ctr routine to first use up the remaining pad bytes. Then if there are enough plaintext bytes left it will use
5264 CTR'ing a long stream process it in blocks of (say) four kilobytes and handle any remaining incomplete blocks at the end of the stream.
5279 dependency issues which are noted in the file. For instance, Yarrow requires CTR chaining mode, a block
5487 /** Accelerated CTR encryption
5685 \subsubsection{Accelerated CTR}
5686 This function is meant for accelerated CTR encryption. It is accessible through the accel\_ctr\_encrypt pointer.
5687 The \textit{blocks} value is the number of complete blocks to process. The \textit{IV} is the CTR counter vector. It is an input upon calling this function and must be
5688 updated by the function before returning. The \textit{mode} value indicates whether the counter is big (mode = CTR\_COUNTER\_BIG\_ENDIAN) or
5689 little (mode = CTR\_COUNTER\_LITTLE\_ENDIAN) endian.
5691 This function (and the way it's called) differs from the other two since ctr\_encrypt() allows any size input plaintext. The accelerator will only be
5696 \item The CTR pad is empty
5700 The \textit{CTR pad} is empty when a multiple (including zero) blocks of text have been processed. That is, if you pass in seven bytes to AES--CTR mode you would have to
5701 pass in a minimum of nine extra bytes before the accelerator could be called. The CTR accelerator must increment the counter (and store it back into the