次の方法で共有


_mm_aesdec_si128

Microsoft Specific

Emits the Advanced Encryption Standard (AES) instruction aesdec. This instruction performs one round of AES decryption.

__m128i _mm_aesdec_si128 (
   __m128i v,
   __m128i rkey
); 

Parameters

Parameter

Description

[in] v

The state parameter that contains the data for this instruction to decrypt.

[in] rkey

The round key that this instruction uses to decrypt the data from v.

Return value

The decrypted data.

Requirements

Intrinsic

Architecture

_mm_aesdec_si128

x86, x64

Header file <wmmintrin.h>

Remarks

This instruction decrypts data by using an Equivalent Inverse Cipher with a 128 bit key. AES decryption requires 10 iterations of decryption by using a cipher key that is 128 bits. Each iteration uses this instruction, except for the last iteration. The last iteration must be performed by _mm_aesdeclast_si128.

To encrypt data and be compliant with the AES, use _mm_aesenc_si128.

Example

#include <wmmintrin.h>
#include <stdio.h>

int main()
{
    __m128i a;
    __m128i res;
    __m128i key;

    a.m128i_u64[1] = 0x8899AABBCCDDEEFF;
    a.m128i_u64[0] = 0x0123456789ABCDEF;
    key.m128i_u64[1] = 0x0022446688AACCEE;
    key.m128i_u64[0] = 0x1133557799BBDDFF;

    res = _mm_aesdec_si128( a, key );

    printf_s("Original data: 0x%016I64x%016I64x\n",
        a.m128i_u64[1], a.m128i_u64[0]);
    printf_s("Decoded data: 0x%016I64x%016I64x\n",
        res.m128i_u64[1], res.m128i_u64[0]);

    return 0;
}
Original data: 0x8899aabbccddeeff0123456789abcdef
Decoded data: 0xb57ecfa381da39ee044e4f5176fec48f

See Also

Reference

Compiler Intrinsics

_mm_aesdeclast_si128

_mm_aesenc_si128

AES Intrinsics