Home | History | Annotate | Download | only in libtomcrypt

Lines Matching refs:bytes

288      \hline BSWAP(x) & {\bf unsigned long} x & Swap bytes \\
343 printf("RSA exported key takes %d bytes\n", x);
351 In the above example if the size of the RSA public key was more than 1024 bytes this function would return an error code
353 \textit{x} so that the calling application will know how many bytes were used.
421 The XXX\_setup() routine will setup the cipher to be used with a given number of rounds and a given key length (in bytes).
484 This should indicate a keysize of sixteen bytes is suggested by storing 16 in \textit{keysize.}
513 8, /* key is 8 bytes (64-bits) long */
589 are the minimum and maximum key sizes in bytes. The \textit{block\_length} member is the block size of the cipher
590 in bytes. As a good rule of thumb it is assumed that the cipher supports
652 Note that for \textit{DES} and \textit{3DES} they use 8 and 24 byte keys but only 7 and 21 [respectively] bytes of the keys are in
978 16, /* length of secret key (16 bytes) */
1001 16, /* the IV is 16 bytes long */
1130 These will encrypt or decrypt a variable length array of bytes using the F8 mode state specified. The length is specified in bytes and does not have to be a multiple
1208 The function \textit{eax\_encrypt} will encrypt the bytes in \textit{pt} of \textit{length} octets, and store the ciphertext in
1235 This will terminate the EAX state \textit{eax}, and store up to \textit{taglen} bytes of the message tag in \textit{tag}. The function
1236 then stores how many bytes of the tag were written out back in to \textit{taglen}.
1265 16, /* nonce is 16 bytes */
1294 * it's taglen bytes long */
1347 block size (e.g. 16 bytes for AES).
1382 This will terminate an encrypt stream \textit{ocb}. If you have trailing bytes of plaintext that will not complete a block
1383 you can pass them here. This will also encrypt the \textit{ptlen} bytes in \textit{pt} and store them in \textit{ct}. It will also
1384 store up to \textit{taglen} bytes of the tag into \textit{tag}.
1401 Similarly to the previous function you can pass trailing message bytes into this function. This will compute the
1402 tag of the message (internally) and then compare it against the \textit{taglen} bytes of \textit{tag} provided. By default
1403 \textit{res} is set to zero. If all \textit{taglen} bytes of \textit{tag} can be verified then \textit{res} is set to one (authenticated
1764 Essentially all hash messages are virtually infinitely\footnote{Most hashes are limited to $2^{64}$ bits or 2,305,843,009,213,693,952 bytes.} long message which
1765 are buffered. The data can be passed in any sized chunks as long as the order of the bytes are the same the message digest (hash output) will be the same. For example,
1823 unsigned long hashsize; /* digest output size in bytes */
1840 in bytes, while \textit{blocksize} is the size of blocks the hash expects to the compression function. Technically, this detail is not important
1990 \hline \textbf{Name} & \textbf{Descriptor Name} & \textbf{Size of Message Digest (bytes)} \\
2113 the HMAC code) then the HMAC code is truncated as per FIPS-198 specifications (e.g. take the first \textit{outlen} bytes).
2190 printf("The hmac is %lu bytes long\n", dstlen);
2224 This will send \textit{inlen} bytes from \textit{in} through the active OMAC state \textit{state}. Returns \textbf{CRYPT\_OK} if the
2249 the output MAC code will only be five bytes long. If \textit{outlen} is larger than the default size it is set to the default
2250 size to show how many bytes were actually used.
2263 This will compute the OMAC of \textit{inlen} bytes of \textit{in} using the key \textit{key} of length \textit{keylen} bytes and the cipher
2277 Which will OMAC the entire contents of the file specified by \textit{filename} using the key \textit{key} of length \textit{keylen} bytes
2328 printf("The omac is %lu bytes long\n", dstlen);
2350 Which initializes the \textit{pmac} state with the given \textit{cipher} and \textit{key} of length \textit{keylen} bytes. The chosen cipher
2361 This will process \textit{inlen} bytes of \textit{in} in the given \textit{state}. The function is not sensitive to the granularity of the
2383 This will store up to \textit{outlen} bytes of the tag for the given \textit{state} into \textit{out}. Note that if \textit{outlen} is larger
2384 than the size of the tag it is set to the amount of bytes stored in \textit{out}.
2397 This will compute the PMAC of \textit{msglen} bytes of \textit{msg} using the key \textit{key} of length \textit{keylen} bytes, and the cipher
2411 Which will PMAC the entire contents of the file specified by \textit{filename} using the key \textit{key} of length \textit{keylen} bytes,
2441 This will process \textit{inlen} bytes of \textit{in} through the Pelican MAC. It's best that you pass in multiples of 16 bytes as it makes the
2548 This will compute the XCBC--MAC of \textit{msglen} bytes of \textit{msg}, using the key \textit{key} of length \textit{keylen} bytes, and the cipher
2561 Which will XCBC--MAC the entire contents of the file specified by \textit{filename} using the key \textit{key} of length \textit{keylen} bytes, and the cipher
2582 a single 0x40 or 0xC0 byte followed by enough 0x00 bytes to make the message proper multiple.
2634 This will compute the F9--MAC of \textit{msglen} bytes of \textit{msg}, using the key \textit{key} of length \textit{keylen} bytes, and the cipher
2647 Which will F9--MAC the entire contents of the file specified by \textit{filename} using the key \textit{key} of length \textit{keylen} bytes, and the cipher
2686 Which returns {\bf CRYPT\_OK} if it is ready. Finally to actually read bytes call:
2694 Which returns the number of bytes read from the PRNG. When you are finished with a PRNG state you call
2712 This will write a \textit{PRNG state} to the buffer \textit{out} of length \textit{outlen} bytes. The idea of
2728 a state, emit (say) 8 bytes and then import the previously exported state the next 8 bytes will not
2729 specifically equal the 8 bytes you generated previously.
2764 Below is a simple snippet to read 10 bytes from Yarrow. It is important to note that this snippet is {\bf NOT} secure since
2788 printf("Read %lu bytes from yarrow\n",
2801 int export_size; /* size in bytes of exported state */
2862 (keyboard, mouse, interrupts, etc), and produce an unbounded string of random bytes.
2888 calling add\_entropy(), and setup the key by calling ready(). You can only add up to 256 bytes via
2908 that is a multiple of four bytes.
2915 simulations which need a high quality (and fast) stream of bytes.
2977 bytes a second. The callback pointer may be set to {\bf NULL} to avoid using it if you do not want to. The function returns the number of bytes actually read from
3140 $m - 2h - 2$. For example, with a $1024$--bit RSA key and SHA--1 as the hash the maximum payload is $86$ bytes.
3196 of the modulus $h$ the length of the hash output (in octets) then there can be $m - h - 2$ bytes of salt.
3265 Where \textit{wprng} is the index into the PRNG descriptor array. The \textit{size} parameter is the size in bytes of the RSA modulus desired.
3268 least 128 bytes, and no more than 512 bytes in size (\textit{that is from 1024 to 4096 bits}).
3316 This function will OAEP pad \textit{in} of length \textit{inlen} bytes, RSA encrypt it, and store the ciphertext
3530 16, /* data is 16 bytes long */
3534 7, /* lparam is 7 bytes long */
3551 7, /* lparam is 7 bytes long */
3658 to 4096 bits (512 bytes) which is way more than what is required by ECC. At most, you need 1152 bits to accommodate ECC--521. If you're only using (say)
3736 The \textit{keysize} is the size of the modulus in bytes desired. Currently directly supported values are 12, 16, 20, 24, 28, 32, 48, and 65 bytes which
3954 With DSA, you need a group of order at least 160--bits. By comparison, the ElGamal signature would require at least 256 bytes of storage, whereas the DSA signature
3955 would require only at least 40 bytes.
4005 \textit{modulus\_size} control the difficulty of forging a signature. Both parameters are in bytes. The larger the
4086 Which will sign the data in \textit{in} of length \textit{inlen} bytes. The signature is stored in \textit{out} and the size
4290 It will fail (for among other reasons) when it runs out of input bytes to read, a data type is invalid or a heap failure occurred.
4376 This will encode the list of ASN.1 objects in \textit{list} of length \textit{inlen} objects, and store the output in \textit{out} of length \textit{outlen} bytes.
4790 it is set to the number of bytes stored. If it is smaller than not all of the hash output is stored in \textit{out}.
4917 Where \textit{len} is the size of the prime in bytes ($2 \le len \le 256$). You can set \textit{len} to the negative size you want
5260 cause the ctr routine to first use up the remaining pad bytes. Then if there are enough plaintext bytes left it will use
5268 data type you can perform integer operations with. Ideally it should be four or eight bytes since it must properly divide the size
5269 of your block cipher (e.g. 16 bytes for AES). This means sadly if you're on a platform with 57--bit words (or something) you can't
5292 requires only 200 bytes of memory. This is achieved by not pre-computing the substitution boxes. Having this
5298 will increase by approximately 500 bytes. If this is defined but TWOFISH\_SMALL is not the cipher will still work but
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
5842 The init function initializes the hash and prepares it to process message bytes.
5845 This processes message bytes. The algorithm must accept any length of input that the hash would allow. The input is not
5867 /** size in bytes of exported state */
5954 Read from the PRNG and return the number of bytes read. This function does not have to fill the buffer but it is best
6476 to the \textit{out} buffer. The output must be zero padded (leading bytes) so that the length of the output matches the length of the modulus (in bytes). For example,
6477 for RSA--1024 the output is always 128 bytes regardless of how small the numerical value of the exponentiation is.