摘要 |
According to one embodiment, an encryption device uses N extended keys (N: a natural number not less than 2) obtained by extending one encryption key, and includes a first memory, a comparison circuit, a second memory, a selector, and an extension calculator. The first memory stores a flag corresponding to an initial value of a key. The comparison circuit outputs a signal indicating comparison matching when a command and the key are related to encryption. The selector loads the key in the first memory into the second memory upon receiving the signal. The extension calculator calculates the extended keys based on the key in the second memory and inputs them to the selector. Except when loading the initial value of the key into the second memory, the selector loads the extended keys into the second memory to extend the encryption key to from the first to N-th extended keys.
|