modes.h revision 4d703b5c9cb1bc29ace6c53cb50b2fe766e6370f
1N/A * The contents of this file are subject to the terms of the 1N/A * Common Development and Distribution License (the "License"). 1N/A * You may not use this file except in compliance with the License. 1N/A * See the License for the specific language governing permissions 1N/A * and limitations under the License. 1N/A * When distributing Covered Code, include this CDDL HEADER in each 1N/A * If applicable, add the following below this CDDL HEADER, with the 1N/A * fields enclosed by brackets "[]" replaced with your own identifying 1N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1N/A * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 1N/A * Use is subject to license terms. 1N/A * cc_keysched: Pointer to key schedule. 1N/A * cc_keysched_len: Length of the key schedule. 1N/A * cc_remainder: This is for residual data, i.e. data that can't 1N/A * be processed because there are too few bytes. 1N/A * Must wait until more data arrives. 1N/A * cc_remainder_len: Number of bytes in cc_remainder. 1N/A * cc_iv: Scratch buffer that sometimes contains the IV. 1N/A * cc_lastp: Pointer to previous block of ciphertext. 1N/A * cc_copy_to: Pointer to where encrypted residual data needs 1N/A * cc_flags: PROVIDER_OWNS_KEY_SCHEDULE 1N/A * When a context is freed, it is necessary 1N/A * to know whether the key schedule was allocated 1N/A * by the caller, or internally, e.g. an init routine. 1N/A * If allocated by the latter, then it needs to be freed. 1N/A * ECB_MODE, CBC_MODE, CTR_MODE, or CCM_MODE * ctr_lower_mask Bit-mask for lower 8 bytes of counter block. * ctr_upper_mask Bit-mask for upper 8 bytes of counter block. * ccm_mac_len: Stores length of the MAC in CCM mode. * ccm_mac_buf: Stores the intermediate value for MAC in CCM encrypt. * In CCM decrypt, stores the input MAC value. * ccm_data_len: Length of the plaintext for CCM mode encrypt, or * length of the ciphertext for CCM mode decrypt. * ccm_processed_data_len: * Length of processed plaintext in CCM mode encrypt, * or length of processed ciphertext for CCM mode decrypt. * Length of MAC data accumulated in CCM mode decrypt. * ccm_pt_buf: Only used in CCM mode decrypt. It stores the * decrypted plaintext to be returned when * MAC verification succeeds in decrypt_final. * Memory for this should be allocated in the AES module. * gcm_tag_len: Length of authentication tag. * gcm_ghash: Stores output from the GHASH function. * gcm_processed_data_len: * Length of processed plaintext (encrypt) or * length of processed ciphertext (decrypt). * gcm_pt_buf: Stores the decrypted plaintext returned by * decrypt_final when the computed authentication * tag matches the user supplied tag. * gcm_pt_buf_len: Length of the plaintext buffer. * gcm_J0: Pre-counter block generated from the IV. * gcm_len_a_len_c: 64-bit representations of the bit lengths of * gcm_kmflag: Current value of kmflag. Used only for allocating * the plaintext buffer during decryption. #
endif /* _COMMON_CRYPTO_MODES_H */