Home | History | Annotate | Download | only in libtomcrypt

Lines Matching defs:Data

131 does not process SSL or OpenPGP messages, it doesn't read X.509 certificates, or write PEM encoded data.  It does, however,
147 and store data in a format independent of the platform. This means if you encrypt with Blowfish on a PPC it should decrypt
254 related issue is if you use the same symmetric cipher, hash or public key state data in multiple threads. Normally
392 Most functions require inputs that are arrays of the data type \textit{unsigned char}. Whether it is a symmetric key, IV
394 lower eight bits contain data. For example, if you want to pass a 256 bit key to a symmetric ciphers setup routine, you
404 should never use the ECB modes directly to encrypt data. Instead you should use the ECB functions to make a chaining mode,
409 All ciphers store their scheduled keys in a single data type called \textit{symmetric\_key}. This allows all ciphers to
523 ct, /* store encrypted data here */
530 pt, /* store decrypted data here */
808 to encrypt whole blocks at a time. However, the library will buffer data allowing the user to encrypt or decrypt partial
831 accomplish this by buffering the data required to complete a block. This allows you to encrypt or decrypt any size
1056 To process data use the following functions:
1116 To encrypt or decrypt data we use the following two functions:
1166 The \textit{header} data is meant to be meta--data associated with a stream that isn't private (e.g., protocol messages). It can
1167 be added at anytime during an EAX stream, and is part of the authentication tag. That is, changes in the meta-data can be detected by changes in the output tag.
1192 When this function completes, the \textit{eax} state will be initialized such that you can now either have data decrypted or
1193 encrypted in EAX mode. Note: if \textit{headerlen} is zero you may pass \textit{header} as \textbf{NULL} to indicate there is no initial header data.
1195 To encrypt or decrypt data in a streaming mode use the following.
1216 Note: both of these functions allow you to send the data in any granularity but the order is important. While
1217 the eax\_init() function allows you to add initial header data to the stream you can also add header data during the
1273 /* now encrypt data, say in a loop or whatever */
1349 This mode has no \textit{Associated Data} like EAX mode does which means you cannot authenticate metadata along with the stream.
1350 To encrypt or decrypt data use the following.
1363 This will encrypt (or decrypt for the latter) a fixed length of data from \textit{pt} to \textit{ct} (vice versa for the latter).
1387 an input message equal to the length of the block size then you pass the data here (not to ocb\_encrypt()) only.
1457 This performs the \textit{CCM} operation on the data. The \textit{cipher} variable indicates which cipher in the descriptor table to use. It must have a
1464 The nonce or salt is \textit{nonce} of length \textit{noncelen} octets. The header is meta--data you want to send with the message but not have
1472 As implemented, this version of CCM cannot handle header or plaintext data longer than $2^{32} - 1$ octets long.
1543 however, unlike EAX it cannot accept \textit{additional authentication data} (meta--data) after plaintext has been processed. This mode also only works with
1546 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
1547 unique to every session. Next, the the optional additional authentication data is processed, and finally the plaintext (or ciphertext depending on the direction).
1577 \subsubsection{Additional Authentication Data}
1578 After the entire IV has been processed, the additional authentication data can be processed. Unlike the IV, a packet/session does not require additional
1579 authentication data (AAD) for security. The AAD is meant to be used as side--channel data you want to be authenticated with the packet. Note: once
1580 you begin adding AAD to the GCM state you cannot return to adding IV data until the state has been reset.
1588 This adds the additional authentication data \textit{adata} of length \textit{adatalen} to the GCM state \textit{gcm}.
1601 This processes message data where \textit{pt} is the plaintext and \textit{ct} is the ciphertext. The length of both are equal and stored in \textit{ptlen}. Depending on
1751 Like the ciphers, there are hash core functions and a universal data type to hold the hash state called \textit{hash\_state}. To initialize hash
1758 This simply sets up the hash to the default state governed by the specifications of the hash. To add data to the message being hashed call:
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,
1843 The \textit{init} member initializes the hash, \textit{process} passes data through the hash, \textit{done} terminates the hash and retrieves the
1915 This will hash the data pointed to by \textit{in} of length \textit{inlen}. The hash used is indexed by the \textit{hash} parameter. The message
1966 printf("Error hashing data: %s\n", error_to_string(err));
2020 data. While it is in the hash system you still have to tell the CHC code which cipher to use. This is accomplished
2102 number of octets to process. Like the hash process routines you can send the data in arbitrarily sized chunks. When you
2215 wish to use. The \textit{key} and \textit{keylen} parameters are the keys used to authenticate the data.
2217 To send data through the algorithm call
2225 function succeeds. The function is not sensitive to the granularity of the data. For example,
2353 To MAC data simply send it through the process function.
2362 data. For example,
2433 This will initialize the Pelican state with the given AES key. Once this has been done you can begin processing data.
2473 /* MAC some data */
2475 "hello world", /* data to mac */
2476 11 /* length of data */
2514 To process data through XCBC--MAC use the following function:
2600 To process data through F9--MAC use the following function:
2664 used to expand a shorter bit string into a longer bit string. PRNGs are used wherever random data is required such as Public Key (PK)
2906 Unlike Yarrow and Fortuna, all of the entropy (and hence security) of this algorithm rests in the data
2958 An RNG is related to a PRNG in many ways, except that it does not expand a smaller seed to get the data. They generate their random bits
2972 Which will try one of three methods of getting random data. The first is to open the popular \textit{/dev/random} device which
3083 parameter indicates the length of the modulus in bits. The padded data is stored in \textit{out} with a length of \textit{outlen} octets. The output will not be
3102 This will remove the PKCS padding data pointed to by \textit{msg} of length \textit{msglen}. The decoded data is stored in \textit{out} of length
3198 This function does not actually sign the data it merely pads the hash of a message so that it can be processed by rsa\_exptmod().
3251 the hash of documents only but also to pad the inputs with data to remove such structure.
3360 This function will RSA decrypt \textit{in} of length \textit{inlen} then OAEP de-pad the resulting data and store it in
3364 If the RSA decrypted data is not a valid OAEP packet then \textit{stat} is set to $0$. Otherwise, it is set to $1$.
3456 This will RSA \textit{verify} the signature pointed to by \textit{sig} of length \textit{siglen} octets. Next, the RSA decoded data is PSS decoded
3459 If the RSA decoded data is not a valid PSS message, or if the PSS decoded hash does not match the \textit{msghash}
3480 This will RSA \textit{verify} the signature pointed to by \textit{sig} of length \textit{siglen} octets. Next, the RSA decoded data is PKCS decoded
3483 If the RSA decoded data is not a valid PSS message, or if the PKCS decoded hash does not match the \textit{msghash}
3529 if ((err = rsa_encrypt_key(pt, /* data we wish to encrypt */
3530 16, /* data is 16 bytes long */
3546 if ((err = rsa_decrypt_key(out, /* encrypted data */
3553 &res, /* validity of data */
3596 import the key, strip off the additional data (it's the preferred hash) and fill in the rsa\_key structure as if it were a native RSAPublicKey. Note that
3872 The data is encrypted to the public ECC \textit{key} such that only the holder of the private key can decrypt the payload. To have multiple
4086 Which will sign the data in \textit{in} of length \textit{inlen} bytes. The signature is stored in \textit{out} and the size
4102 Which will verify the data in \textit{hash} of length \textit{inlen} against the signature stored in \textit{sig} of length \textit{siglen}.
4172 LibTomCrypt supports a variety of ASN.1 data types encoded with the Distinguished Encoding Rules (DER) suitable for various cryptographic protocols. The data types
4176 On top of the basic data types are the SEQUENCE and SET data types which are collections of other ASN.1 types. They are provided
4177 in the same manner as the other data types except they use list of objects known as the \textbf{ltc\_asn1\_list} structure. It is defined as the following:
4183 void *data;
4192 The \textit{type} field is one of the following ASN.1 field definitions. The \textit{data} pointer is a void pointer to the data to be encoded (or the destination) and the
4193 \textit{size} field is specific to what you are encoding (e.g. number of bits in the BIT STRING data type). The \textit{used} field is primarily for the CHOICE decoder
4194 and reflects if the particular member of a list was the decoded data type. To help build the lists in an orderly fashion the macro
4195 \textit{LTC\_SET\_ASN1(list, index, Type, Data, Size)} has been provided.
4197 It will assign to the \textit{index}th position in the \textit{list} the triplet (Type, Data, Size). An example usage would be:
4254 The SEQUENCE data type is a collection of other ASN.1 data types encapsulated with a small header which is a useful way of sending multiple data types in one packet.
4270 The \textit{data} pointer in the list would be the same pointer you would pass to the respective ASN.1 encoder (e.g. der\_encode\_bit\_string()) and it is simply passed on
4272 the \textit{data} pointer is simply a pointer to another \textbf{ltc\_asn1\_list}.
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.
4329 These either encode or decode (respectively) a SEQUENCE data type where the items in the sequence are specified after the length parameter.
4331 The list of items are specified as a triple of the form \textit{(type, size, data)} where \textit{type} is an \textbf{int}, \textit{size} is a \textbf{unsigned long}
4332 and \textit{data} is \textbf{void} pointer. The list of items must be terminated with an item with the type \textbf{LTC\_ASN1\_EOL}.
4334 It is ideal that you cast the \textit{size} values to unsigned long to ensure that the proper data type is passed to the function. Constants such as \textit{1} without
4427 To encode or decode INTEGER data types use the following functions.
4443 These will encode or decode a signed INTEGER data type using the bignum data type to store the large INTEGER. To encode smaller values without allocating
4481 These will encode or decode a BIT STRING data type. The bits are passed in (or read out) using one \textbf{char} per bit. A non--zero value will be interpreted
4502 These will encode or decode an OCTET STRING data type. The octets are stored using one \textbf{unsigned char} each.
4639 It is suggested that decoded data be further scrutinized (e.g. days of month in particular).
4644 decoder. The decoder will scan through the provided list attempting to use the appropriate decoder on the input packet. The list can contain any ASN.1 data
4658 \textit{outlen} elements. The \textit{inlen} field will be updated with the length of the decoded data type, as well as the respective entry in the \textit{list} field
4659 will have the \textit{used} flag set to non--zero to reflect it was the data type decoded.
4662 The ASN.1 \textit{flexi} decoder allows the developer to decode arbitrary ASN.1 DER packets (provided they use data types LibTomCrypt supports) without first knowing
4663 the structure of the data. Where der\_decode \_sequence() requires the developer to specify the data types to decode in advance the flexi decoder is entirely
4689 have to convert the list by first storing all of the siblings in an array then storing all the children as sub-lists of a sequence using the \textit{.data}
4730 Now \textit{list} points to the \textit{Name} member (with the tag IA5 STRING). The \textit{data}, \textit{size}, and \textit{type} members of \textit{list} should reflect
5088 \textbf{DATADIR} is the prefix for the data (documentation) directory which defaults to \textit{/usr/share/doc/libtomcrypt/pdf}.
5248 cbc\_encrypt() that it can safely XOR multiple octets in one step by using a larger data type. This has the benefit of
5263 The simplest precaution is to make sure you process all data in power of two blocks and handle \textit{remainder} at the end. e.g. If you are
5268 data type you can perform integer operations with. Ideally it should be four or eight bytes since it must properly divide the size
5567 @param adata The additional authentication data (header)
5655 Inside the \textit{symmetric\_key} union there is a \textit{void *data} which you can use to allocate data if you need a data structure that does not fit with the existing
5787 /** Process a block of data
5789 @param in The data to hash
5790 @param inlen The length of the data (octets)
5852 A compatible accelerator must allow processing data in any granularity which may require internal padding on the driver side.
5893 @param out [out] Where to store the data
5894 @param outlen Length of data desired (octets)
5919 @param in The data to import
5920 @param inlen The length of the data to import (octets)
5961 An exported PRNG state is data that the PRNG can later import to resume activity. They're not meant to resume \textit{the same session}
5999 /* ---- data movement ---- */
6396 All \textit{bignums} are accessed through an opaque \textit{void *} data type. You must internally cast the pointer if you need to access members of your bignum structure. During