[**Documentation**](../../../README)

***

[Documentation](../../../README) / [zerotal](../../README) / [auth](../README) / RECOVERY\_CODE\_BITS

# Variable: RECOVERY\_CODE\_BITS

> `const` **RECOVERY\_CODE\_BITS**: `160` = `160`

Defined in: [packages/auth/src/TwoFactorService.ts:130](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/auth/src/TwoFactorService.ts#L130)

Entropy per recovery code, in bits.

Recovery codes are stored under a single unsalted SHA-256, which is only defensible
because the search space is this large: 2^160 leaves an offline attacker with a leaked
column nothing to do. Lowering this without also changing the storage scheme turns every
recovery code into a brute-forceable second-factor bypass.
