IP Library Granted Patent US 12700997
Granted Patent B2
US 12700997 · App. 18/325,447 · Granted Aug 4, 2026

Cryptographic device using transposition function and/or mapping function and cryptographic method thereof

Inventors: Shun-Hsiung Chen (Hsinchu Science Park, TW); Kun-Yi Wu (Tainan City, TW); Yu-Shan Li (Tainan City, TW)
Assignee: Nuvoton Technology Corporation
H04L9/0869
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12700997
App. No.
18/325,447
Granted
Aug 4, 2026
Kind
B2
Abstract

A cryptographic device for a memory device includes a determination unit, a mapping unit, and a cryptographic unit. The determination unit determines that a memory address is in a protection area to select a key and a random number. The mapping unit maps a binary code to an injection code according to the key and the memory address, in which the binary code includes the random number and the memory address. The cryptographic unit generates a key stream according to the key and the injection code.

Claims (44)

1 . A cryptographic method for a memory array, comprising:

storing the start address and the end address of the memory address of the protection area, the key corresponding to the memory address of the protection area, and the random number in a register, wherein a user sets the key and the random number that correspond to the memory address of the protection area stored in the register through a bus interface;

determining that a memory address is located in the protection area to select a key and a random number;

when it is determined that the memory address is located in the protection area, selecting the key and the random number corresponding to the memory address from the register;

generating a binary code, wherein the binary code comprises the random number and the memory address;

generating an operation code according to the key, the memory address, and the binary code; and

generating a key stream according to the key and the operation code.

2 . The cryptographic method as defined in claim 1 , further comprising:

reading encrypted read data from a memory array and/or writing write data into the memory array according to the memory address and an operation instruction; and

decrypting the encrypted read data and encrypting the write data using the key stream.

3 . The cryptographic method as defined in claim 1 , wherein the step of generating the operation code according to the key, the memory address and the binary code further comprises:

generating a selection code according to the key and the memory address;

performing an exclusive OR operation on the selection code and the binary code to generate a first result; and

mapping the first result to the operation code based on an injection function.

4 . The cryptographic method as defined in claim 1 , wherein the step of generating the injection code according to the key, the memory address and the binary code further comprises:

generating a selection code according to the key and the memory address;

mapping the selection code to a first result based on a first injection function;

mapping the binary code to a second result based on a second injection function; and

performing an exclusive OR operation on the first result and the second result to generate the operation code.

5 . The cryptographic method as defined in claim 1 , wherein the step of generating the operation code according to the key, the memory address and the binary code further comprises:

generating a selection code according to the key and the memory address;

dividing the selection code into a first part and a second part;

dividing the binary code into a third part and a fourth part;

performing an exclusive OR operation on the first part and the third part to generate a first result;

performing the exclusive OR operation on the second part and the fourth part to generate a second result;

mapping the first result to a first injection code based on a first injection function;

mapping the second result to a second injection code based on a second injection function; and

combining the first injection code and the second injection code to generate the operation code.

6 . The cryptographic method as defined in claim 5 , wherein the step of generating the selection code according to the key and the memory address further comprises:

performing an addition operation on each bit of the key and the corresponding bit of the memory address to generate the selection code.

7 . The cryptographic method as defined in claim 5 , wherein the step of generating the selection code according to the key and the memory address further comprises:

performing an exclusive OR operation on each bit of the key and the corresponding bit of the memory address to generate the selection code.

8 . The cryptographic method as defined in claim 1 , wherein the step of generating the operation code according to the key, the memory address and the binary code further comprises:

generating a selection code according to the key and the memory address;

selecting a transposition logic according to the selection code;

selecting either the binary code or the operation code to output as an input code;

transposing the input code based on the transposition logic to generate a transposition code; and

mapping the selection code and the transposition code to the operation code based on an injection function.

9 . The cryptographic method as defined in claim 1 , wherein the step of generating the operation code according to the key, the memory address, and the binary code further comprises:

generating a selection code according to the key and the memory address;

selecting a transposition logic according to the selection code;

selecting either the binary code or a transposition code to output as an input code;

mapping the selection code and the input code to an injection code based on an injection function; and

transposing the injection code to generate the operation code based on the transposition logic.