Atomic Cryptography Extension (ACE)

The Atomic Cryptography Extension (ACE) is being developed by the RISC-V High Assurance Cryptography (HAC) Task Group.

ACE is an Instruction Set Architecture (ISA) extension that provides atomic (i.e., full-round) cryptographic operations using Cryptographic Contexts (CCs).

Cryptographic Contexts

A Cryptographic Context is an indivisible data structure consisting of metadata and a content section that holds secrets such as keys. The metadata binds secrets to a specific cryptographic algorithm and defines usage and access policies.

These policies prevent the secret from being used with other algorithms and can optionally restrict access by unauthorized processes, security states, or other entities.

Forms of Cryptographic Contexts

Cryptographic Contexts take one of two forms:

Key security principle: ACE instructions can use keys only while those keys reside inside a Cryptographic Register (CR).

Cryptographic Registers

ACE instructions can use keys only while they reside in a CR. When a Cryptographic Context is stored in memory as an SCC, the binding between the key and its metadata relies on the cryptographic strength of the AEAD encryption.

SCCs may be produced by trusted software or hardware and supplied to applications.

Any piece of software can create its own Cryptographic Context by writing a key and metadata into a Cryptographic Register. The original key can then be erased from system memory to reduce its exposure while ACE continues to operate using the key secured within the register.

Algorithm Selection Through Metadata

The metadata may specify anything from a basic cipher, such as AES-128 or AES-256, to a mode of operation such as SM4-GCM-SIV.

A key advantage of ACE is that a small set of algorithm-agnostic instructions can support many different algorithms because the metadata selects the algorithm to execute.

Example: The same compiled binary can target any 128-bit cipher in a given mode, such as AES-GCM-SIV, SM4-GCM-SIV, Калина-GCM-SIV, or Кузнечик-GCM-SIV. Only the Cryptographic Context changes; the instruction sequence remains the same.

Symmetric and Asymmetric Cryptography

The current ACE interface supports only symmetric cryptographic primitives.

However, the ISA can also support asymmetric cryptography if public key operations are specified as algorithms that can be selected through the metadata.

Key Advantages of ACE

Key Technical Takeaways & Design Verification Flow