Trap Code for Quantum Authentication

From Quantum Protocol Zoo
Jump to: navigation, search

The Trap Code is a non-interactive scheme for quantum authentication. It appends two additional trap registers in a fixed state, on which a Pauli twirl or a permutation is acted on. It furthermore makes use of error correction codes for encoding the quantum message.

Tags: Two Party Protocol, Quantum Functionality, Specific Task, Building Block


The trap code requires a shared pair of secret classical keys. It makes use of an error correction code to encode the quantum message. Consequently, two so-called trap registers in the fixed states and are appended. The total register is then encrypted by applying a permutation and a Pauli twirl, each according to the classical keys. The receiver then applies the inverse Pauli twirl and permutation and consequently measures the two trap registers in the computational or Hadamard basis respectively to decide whether to accept or abort the process.


  • The sender and receiver share a secret classical pair of keys
  • The sender and receiver have agreed on an error correction code


  • : suppliant (sender)
  • : authenticator (prover)
  • : 1-qubit input state
  • : an error correction code that corrects up errors errors by encoding logical qubits in physical qubits, where
  • : a set of permutations indexed by
  • : a set of Pauli operations indexed by

Protocol Description[edit]

Input: , pair of secret classical keys

Output: Quantum state if the protocol accepts; fixed quantum state if the protocol aborts

  • Encoding:
  1. applies an error correction code
  2. appends an additional trap register of qubits in state
  3. appends a second additional trap register of qubits in state
  4. permutes the total -qubit register by according to the key
  5. applies a Pauli encryption according to key
  • Mathematical Encoding Description:
    Mathematically, the encoding process is given by
    In the above, denotes the quantum message after applying the error correction code for encoding (see step 1).
  • Decoding:
  1. applies according to key
  2. applies inverse permutation according to the key
  3. measures the last qubits in the Hadamard basis
  4. measures the second last qubits in the computational basis

    a. If the two measurements in step 3 and 4 result in and , an additional flag qubit in state is appended and the quantum message is decoded according to the error correction code
    b. Otherwise, an additional flag qubit in state is appended and the (disturbed) encoded quantum message is replaced by a fixed state
  • Mathematical Decoding Description:
    Mathematically, the decoding process is given by
    In the above, refers to decoding of the error correction code (see step 4a) and denotes the trace over the two trap registers. Moreover, and refer to the measurement projectors that determine whether the protocol accepts or aborts the received quantum message. It is


  1. Broadbent et al. (2012)
  2. Broadbent and Wainewright (2016).
Contributed by Isabel Nha Minh Le and Shraddha Singh
This page was created within the QOSF Mentorship Program Cohort 4