Skip to content

Commit 8c52d43

Browse files
committed
Docs
1 parent 116b933 commit 8c52d43

3 files changed

Lines changed: 43 additions & 2 deletions

File tree

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![MFKDF](https://raw.githubusercontent.com/multifactor/MFKDF/main/logo.png "MFKDF")](https://mfkdf.com/ "MFKDF")
1+
[<img src="https://raw.githubusercontent.com/multifactor/MFKDF/main/logo.png" height="64">](https://mfkdf.com/ "MFKDF")
22

33
Next-Generation Multi-Factor Key Derivation Function (MFKDF2)
44

@@ -20,12 +20,13 @@ Next-Generation Multi-Factor Key Derivation Function (MFKDF2)
2020
[Paper](https://www.usenix.org/system/files/usenixsecurity23-nair-mfkdf.pdf) |
2121
[Author](https://nair.me)
2222

23-
The Multi-Factor Key Derivation Function (MFKDF) is a function that takes multiple inputs and outputs a string of bytes that can be used as a cryptographic key. It serves the same purpose as a password-based key derivation function (PBKDF), but is stronger than password-based key derivation due to its support for multiple authentication factors, including HOTP, TOTP, and hardware tokens like YubiKey. MFKDF also enables self-service account recovery via K-of-N (secret-sharing style) key derivation, eliminating the need for central recovery keys, and supports arbitrarily complex key derivation policies.
23+
The Next-Generation Multi-Factor Key Derivation Function (MFKDF2) is a function that takes multiple inputs and outputs a string of bytes that can be used as a cryptographic key. It serves the same purpose as a password-based key derivation function (PBKDF), but is stronger than password-based key derivation due to its support for multiple authentication factors, including HOTP, TOTP, and hardware tokens like YubiKey. MFKDF2 also enables self-service account recovery via K-of-N (secret-sharing style) key derivation, eliminating the need for central recovery keys, and supports arbitrarily complex key derivation policies. It builds on the now-deprecated original MFKDF.
2424

2525
###### Contents
2626

2727
- [Introduction](#introduction)
2828
- [Getting Started](#getting-started)
29+
- [Migrating](#migrating)
2930
- [Multi-Factor Key Derivation](#multi-factor-key-derivation)
3031
- [Threshold-based Key Derivation](#threshold-based-key-derivation)
3132
- [Key Stacking](#key-stacking)
@@ -75,6 +76,25 @@ Require MFKDF like so:
7576

7677
const mfkdf = require('mfkdf');
7778

79+
# Migrating
80+
81+
MFKDF2 retains as much backwards-compatibility as possible with the original MFKDF API, but makes the following breaking changes compared to the original MFKDF:
82+
83+
- Removed ISO key-based authentication, we recommend use of MFCHF2 instead
84+
- Removed support for enveloped secrets and keys, we recommend deriving sub-keys or using external secret storage
85+
- Removed support for KDFs other than argon2id; any argon2 params higher than (but not lower than) OWASP defaults are supported
86+
- Removed support for custom key sizes; derived keys are always 256 bits, and can be stretched or truncated from there
87+
88+
Additionally, we've made a number of major security and feature improvements, including:
89+
90+
- A number of security improvements, including share encryption, policy integrity, and per-factor salting
91+
- Key derivation parameters can be hardened over time without changing the key
92+
- Support for Passkeys as a factor via the WebAuthn PRF extension
93+
- Support for deriving passwords from an MFKDF2-derived key (via MFDPG2)
94+
- Optional support for timing oracles to harden TOTP factor construction
95+
96+
In general, MFKDF2 is more **opinionated** than the original MFKDF, with the goal of being more secure by default and making insecure design decisions harder, at the cost of some flexibility. It also focuses on key derivation has less anscillary features, offloading cryptographic use of derived keys to external libraries in order to improve this library's auditability and reduce its attack surface. As a result, it also removes many problematic dependencies from the original MFKDF library.
97+
7898
# Multi-Factor Key Derivation
7999

80100
## Setup Key

tutorials/00migration.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Migrating
2+
3+
MFKDF2 retains as much backwards-compatibility as possible with the original MFKDF API, but makes the following breaking changes compared to the original MFKDF:
4+
5+
- Removed ISO key-based authentication, we recommend use of MFCHF2 instead
6+
- Removed support for enveloped secrets and keys, we recommend deriving sub-keys or using external secret storage
7+
- Removed support for KDFs other than argon2id; any argon2 params higher than (but not lower than) OWASP defaults are supported
8+
- Removed support for custom key sizes; derived keys are always 256 bits, and can be stretched or truncated from there
9+
10+
Additionally, we've made a number of major security and feature improvements, including:
11+
12+
- A number of security improvements, including share encryption, policy integrity, and per-factor salting
13+
- Key derivation parameters can be hardened over time without changing the key
14+
- Support for Passkeys as a factor via the WebAuthn PRF extension
15+
- Support for deriving passwords from an MFKDF2-derived key (via MFDPG2)
16+
- Optional support for timing oracles to harden TOTP factor construction
17+
18+
In general, MFKDF2 is more **opinionated** than the original MFKDF, with the goal of being more secure by default and making insecure design decisions harder, at the cost of some flexibility. It also focuses on key derivation has less anscillary features, offloading cryptographic use of derived keys to external libraries in order to improve this library's auditability and reduce its attack surface. As a result, it also removes many problematic dependencies from the original MFKDF library.

tutorials/tutorials.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"00migration": {
3+
"title": "Migrating from MFKDF to MFKDF2"
4+
},
25
"01quickstart": {
36
"title": "Getting Started"
47
},

0 commit comments

Comments
 (0)