4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or https://opensource.org/licenses/CDDL-1.0.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
28 #include <aes/aes_impl.h>
31 * Expand the 32-bit AES cipher key array into the encryption and decryption
35 * key AES key schedule to be initialized
37 * keyBits AES key size (128, 192, or 256 bits)
40 aes_x86_64_generate(aes_key_t
*key
, const uint32_t *keyarr32
, int keybits
)
42 key
->nr
= rijndael_key_setup_enc_amd64(&(key
->encr_ks
.ks32
[0]),
44 key
->nr
= rijndael_key_setup_dec_amd64(&(key
->decr_ks
.ks32
[0]),
49 aes_x86_64_will_work(void)
54 const aes_impl_ops_t aes_x86_64_impl
= {
55 .generate
= &aes_x86_64_generate
,
56 .encrypt
= &aes_encrypt_amd64
,
57 .decrypt
= &aes_decrypt_amd64
,
58 .is_supported
= &aes_x86_64_will_work
,
59 .needs_byteswap
= B_FALSE
,
63 #endif /* defined(__x86_64) */