Key encapsulation

Threebears-Papabear-R2

Mike Hamburg's round-2 I-LWE KEM with BabyBear, MamaBear and PapaBear CCA and CPA forms

unverified Root API only Post-quantum
Unverified tier.

Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.

About Threebears-Papabear-R2

Threebears-Papabear-R2 is one of 6 Three Bears Round 2 variants in the NextSSL registry, a key encapsulation mechanism. It uses a 1,584-byte public key, a 40-byte secret key, a 1,697-byte ciphertext and a 32-byte shared secret. It is designed to resist attacks by large quantum computers. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).

Overview

Three Bears Round 2 is the second-round Three Bears key encapsulation family by Mike Hamburg, based on Integer Learning With Errors. It includes CCA and CPA forms of BabyBear, MamaBear and PapaBear, plus ephemeral forms. NextSSL carries six round-2 variants as unverified archival entries.

The round-2 Three Bears specification refined the round-1 design by Mike Hamburg and added CCA-secure and CPA-secure forms at each of the three parameter levels. The underlying hardness assumption is Integer Learning With Errors, which avoids the number-theoretic transform and uses simple integer arithmetic.

NextSSL carries the BabyBear, MamaBear and PapaBear round-2 ephemeral variants, with their public keys of 804, 1194 and 1584 bytes respectively for the 624, 936 and 1248 parameter sets. The CCA variants carry larger secret keys than the CPA variants, which store the secret key in a different form. All use 32-byte shared secrets.

The archive tier is unverified. Three Bears was not standardised, and ML-KEM is the comparable standard choice.

History

2017–2017
  1. Three Bears Round 2 published by Mike Hamburg

How it works

  1. A seed generates an integer public vector and a small secret, and the public key is the masked product.
  2. Encapsulation encrypts a random message under the public key using integer arithmetic.
  3. CCA forms re-encrypt on decapsulation and return a pseudorandom key if the check fails.

Security notes

Unverified in NextSSL. CPA forms lack chosen-ciphertext protection and should not be used as a KEM. Ephemeral forms must not be reused.

Typical uses

Research into integer-LWE key encapsulationComparing CCA and CPA forms at three security levelsBenchmarking lattice KEM sizes

Sizes

FieldBytesMeaning
pk1,584Public key
sk40Secret key
ct1,697Ciphertext
ss32Shared secret
seed0Seed
coins0Encapsulation randomness

Use it

from nextssl_demo import NextSSL

root = NextSSL(root=True)   # tier 'unverified' is reachable from the root API only
pk, sk = root.call("kem_keygen", "threebears-papabear-r2", None, outs=2)
ct, ss = root.call("kem_encaps", "threebears-papabear-r2", None, pk, outs=2)
assert ss == root.call("kem_decaps", "threebears-papabear-r2", None, sk, ct)[0]

Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.

Frequently asked questions

What is Threebears-Papabear-R2?

Threebears-Papabear-R2 is a KEM in the Three Bears Round 2 family. Three Bears Round 2 is the second-round Three Bears key encapsulation family by Mike Hamburg, based on Integer Learning With Errors.

What are the Threebears-Papabear-R2 sizes?

In NextSSL, Threebears-Papabear-R2 uses: public key 1,584 bytes, ciphertext 1,697 bytes, shared secret 32 bytes.

Is Threebears-Papabear-R2 post-quantum?

Yes. Threebears-Papabear-R2 is a post-quantum kem: it is designed to resist attacks by large quantum computers. Its tier in NextSSL is unverified.

Who designed Threebears-Papabear-R2 and when?

Threebears-Papabear-R2 belongs to the Three Bears Round 2 family, first published in 2017 by Mike Hamburg.

Is Threebears-Papabear-R2 safe to use?

Threebears-Papabear-R2 is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).

What other Three Bears Round 2 variants are there?

NextSSL also registers threebears-babybear-r2, threebears-babybearephem-r2, threebears-mamabear-r2, threebears-mamabearephem-r2, threebears-papabearephem-r2 in the Three Bears Round 2 family.