Block ciphers

Safer+

James Massey's byte-oriented cipher family, including SAFER+ used in Bluetooth pairing

unverified Root API only
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 Safer+

Safer+ is one of 5 SAFER variants in the NextSSL registry, a block cipher. It uses a 16–32-byte key and a 16-byte (128-bit) block. 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

SAFER (Secure And Fast Encryption Routine) is a family of byte-oriented block ciphers designed by James Massey starting in 1993. Members include SAFER K-64, SAFER K-128, SAFER SK-64, SAFER SK-128 and the 128-bit-block SAFER+.

SAFER ciphers operate on bytes using exponentiation and logarithm tables modulo 257 as non-linear layers, alternating XOR and addition for key mixing, and a Pseudo-Hadamard Transform network for diffusion. The original K-64 had a 64-bit block and key. After Lars Knudsen found a key-schedule weakness, the SK (strengthened key) variants were introduced. SAFER+ extended the design to a 128-bit block as an AES candidate, and a modified version is used in Bluetooth's legacy authentication functions.

NextSSL includes SAFER K-64, K-128, SK-64, SK-128 and SAFER+ entries wired from source and not yet verified. SAFER+ is no longer used in modern Bluetooth Secure Connections, which rely on AES and elliptic curves instead. The family remains of interest mainly to researchers studying byte-oriented designs. Because the tier is unverified, outputs should be checked against independent reference values before they are relied on for anything beyond experimentation.

History

1993–1993
  1. SAFER published by James Massey

Security notes

The K variants have known key-schedule weaknesses and should not be used. No practical attack on full SAFER+ is known, but the family is dated and little analysed by modern standards.

Typical uses

Analysing legacy Bluetooth pairing (SAFER+)Research on byte-oriented designs

Sizes

FieldBytesMeaning
key16 – 32Secret key
block16Block

Use it

from nextssl_demo import NextSSL

root = NextSSL(root=True)   # tier 'unverified' is reachable from the root API only
block = root.call("blockcipher_encrypt", "safer-plus", None, key, plaintext_block)[0]

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

Frequently asked questions

What is Safer+?

Safer+ is a block cipher in the SAFER family. SAFER (Secure And Fast Encryption Routine) is a family of byte-oriented block ciphers designed by James Massey starting in 1993.

What are the Safer+ sizes?

In NextSSL, Safer+ uses: key 16 to 32 bytes, block 16 bytes.

Who designed Safer+ and when?

Safer+ belongs to the SAFER family, first published in 1993 by James Massey.

Is Safer+ safe to use?

Safer+ 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 SAFER variants are there?

NextSSL also registers safer-k128, safer-k64, safer-sk128, safer-sk64 in the SAFER family.