Skip to content

Commit

Permalink
Add more information about the reference impl
Browse files Browse the repository at this point in the history
  • Loading branch information
tniessen committed Mar 17, 2021
1 parent 094d644 commit 1624d68
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ part of the [NIST submission](https://classic.mceliece.org/nist.html) by
Bernstein et al.

This version is based on the round-2 submission `mceliece-20190331`.
See [`deps/mceliece`](deps/mceliece).

## Installation

Expand Down
39 changes: 35 additions & 4 deletions deps/mceliece/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
The contents of this directory are generated automatically by the `prepare`
script. The `kem` directory contains the
[reference implementation](https://classic.mceliece.org/nist.html) provided by
Bernstein et al.
# Reference implementation of Classic McEliece

The `kem` directory contains the reference implementation of the Classic
McEliece KEM that was provided by Bernstein et al. as part of the
[Classic McEliece NIST submission](https://classic.mceliece.org/nist.html).

- Source: Round-2 submission package
- Revision: `mceliece-20190331`
- File: [`mceliece-20190331.tar.gz`](https://classic.mceliece.org/nist/mceliece-20190331.tar.gz)
- `e298f8bb1380a74d1f5990cb6e921f45` (md5)
- `ec08d18f430601c6661a4d0cfe5f5592fb8d6edb` (sha1)
- `3fa54e9139bb62338445047cb25ab73b0e1e576288f729d20ce4db8c2236f678` (sha256)

## Automatically applied patches

The `extract-kem-from-nist-submission` script was used to generate the contents
of the `kem` directory as well as the header file `mceliece.h` and the file
`binding.gyp`.

The contents of the `kem` directory correspond to the contents of the
`Reference_Implementation/kem` directory that is part of the submission package.
However, the `extract-kem-from-nist-submission` script applies the following
patches.

- The reference implementation uses libkeccak to implement SHAKE256. However,
because Node.js uses OpenSSL by default, references to libkeccak header files
are replaced with references to [`mceliece_externals.h`](mceliece_externals.h)
that defines a compatible interface. The implementation of the interface
uses OpenSSL.
- The reference implementation uses a random number generator that is based on
AES256-CTR. Instead, we patch the implementation to use the AES implementation
and the random number generator provided by OpenSSL via
[`mceliece_externals.h`](mceliece_externals.h).
- Files that are not required for providing bindings for the reference
implementation are removed (e.g., `KATNUM`).
File renamed without changes.

0 comments on commit 1624d68

Please sign in to comment.