You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+44-41
Original file line number
Diff line number
Diff line change
@@ -18,17 +18,9 @@ A Robust Rust Library for CRYSTALS-Kyber Post-Quantum Cryptography.
18
18
<center>
19
19
<!-- markdownlint-enable MD033 MD041 -->
20
20
21
-
[![Made With Rust][made-with-rust-badge]][05]
22
-
[![Crates.io][crates-badge]][07]
23
-
[![Lib.rs][libs-badge]][09]
24
-
[![Docs.rs][docs-badge]][08]
25
-
[![License][license-badge]][02]
26
-
27
-
• [Website][00]
28
-
• [Documentation][08]
29
-
• [Report Bug][03]
30
-
• [Request Feature][03]
31
-
• [Contributing Guidelines][04]
21
+
[![Made With Love][made-with-rust]][05][![Crates.io][crates-badge]][07][![Lib.rs][libs-badge]][09][![Docs.rs][docs-badge]][08][![License][license-badge]][02][![Codecov][codecov-badge]][15]
@@ -38,7 +30,7 @@ A Robust Rust Library for CRYSTALS-Kyber Post-Quantum Cryptography.
38
30
39
31
## Overview 📖
40
32
41
-
KyberLib is a robust Rust library designed for CRYSTALS-Kyber Post-Quantum Cryptography, offering strong security guarantees. This library is compatible with `no_std`, making it suitable for embedded devices and avoids memory allocations. Additionally, it contains reference implementations with no unsafe code and provides an optimized AVX2 version by default on x86_64 platforms. You can also compile it to WebAssembly (WASM) using wasm-bindgen.
33
+
KyberLib is a robust Rust library designed for **CRYSTALS-Kyber Post-Quantum Cryptography**, offering strong security guarantees. This library is compatible with `no_std`, making it suitable for embedded devices and avoids memory allocations. Additionally, it contains reference implementations with no unsafe code and provides an optimized AVX2 version by default on x86_64 platforms. You can also compile it to WebAssembly (WASM) using wasm-bindgen.
42
34
43
35
## Features ✨
44
36
@@ -73,7 +65,7 @@ It takes just a few minutes to get up and running with `kyberlib`.
73
65
### Requirements
74
66
75
67
The minimum supported Rust toolchain version is currently Rust
76
-
**1.56.0** or later (stable).
68
+
**1.60** or later (stable).
77
69
78
70
### Installation
79
71
@@ -95,7 +87,7 @@ To use the `kyberlib` library in your project, add the following to your
95
87
96
88
```toml
97
89
[dependencies]
98
-
kyberlib = "0.0.4"
90
+
kyberlib = "0.0.5"
99
91
```
100
92
101
93
Add the following to your `main.rs` file:
@@ -113,6 +105,8 @@ For optimisations on x86 platforms enable the `avx2` feature and the following R
The KyberLib crate provides several macros to simplify common cryptographic operations:
183
177
184
-
-`kyberlib_assert!`: Asserts that a given expression is true. Panics if the assertion fails.
185
-
-`kyberlib_min!`: Returns the minimum of the given values.
186
-
-`kyberlib_max!`: Returns the maximum of the given values.
187
-
-`kyberlib_generate_key_pair!`: Generates a public and private key pair for CCA-secure Kyber key encapsulation mechanism.
188
-
-`kyberlib_encrypt_message!`: Generates cipher text and a shared secret for a given public key.
189
-
-`kyberlib_decrypt_message!`: Generates a shared secret for a given cipher text and private key.
190
-
-`kyberlib_uake_client_init!`: Initiates a Unilaterally Authenticated Key Exchange.
191
-
-`kyberlib_uake_server_receive!`: Handles the output of a `kyberlib_uake_client_init()` request.
192
-
-`kyberlib_uake_client_confirm!`: Decapsulates and authenticates the shared secret from the output of `kyberlib_uake_server_receive()`.
193
-
-`kyberlib_ake_client_init!`: Initiates a Mutually Authenticated Key Exchange.
194
-
-`kyberlib_ake_server_receive!`: Handles and authenticates the output of a `kyberlib_ake_client_init()` request.
195
-
-`kyberlib_ake_client_confirm!`: Decapsulates and authenticates the shared secret from the output of `kyberlib_ake_server_receive()`.
196
-
197
-
See the [macros module documentation](https://docs.rs/kyberlib/latest/kyberlib/macros/index.html) for more details and usage examples.
178
+
-[`kyberlib_generate_key_pair!`](https://docs.rs/kyberlib/latest/kyberlib/macro.kyberlib_generate_key_pair.html): Generates a public and private key pair for CCA-secure Kyber key encapsulation mechanism.
179
+
180
+
-[`kyberlib_encrypt_message!`](https://docs.rs/kyberlib/latest/kyberlib/macro.kyberlib_encrypt_message.html): Generates cipher text and a shared secret for a given public key.
181
+
182
+
-[`kyberlib_decrypt_message!`](https://docs.rs/kyberlib/latest/kyberlib/macro.kyberlib_decrypt_message.html): Generates a shared secret for a given cipher text and private key.
183
+
184
+
-[`kyberlib_uake_client_init!`](https://docs.rs/kyberlib/latest/kyberlib/macro.kyberlib_uake_client_init.html): Initiates a Unilaterally Authenticated Key Exchange.
185
+
186
+
-[`kyberlib_uake_server_receive!`](https://docs.rs/kyberlib/latest/kyberlib/macro.kyberlib_uake_server_receive.html): Handles the output of a `kyberlib_uake_client_init()` request.
187
+
188
+
-[`kyberlib_uake_client_confirm!`](https://docs.rs/kyberlib/latest/kyberlib/macro.kyberlib_uake_client_confirm.html): Decapsulates and authenticates the shared secret from the output of `kyberlib_uake_server_receive()`.
189
+
190
+
-[`kyberlib_ake_client_init!`](https://docs.rs/kyberlib/latest/kyberlib/macro.kyberlib_ake_client_init.html): Initiates a Mutually Authenticated Key Exchange.
191
+
192
+
-[`kyberlib_ake_server_receive!`](https://docs.rs/kyberlib/latest/kyberlib/macro.kyberlib_uake_server_receive.html): Handles and authenticates the output of a `kyberlib_ake_client_init()` request.
193
+
194
+
-[`kyberlib_ake_client_confirm!`](https://docs.rs/kyberlib/latest/kyberlib/macro.kyberlib_ake_client_confirm.html): Decapsulates and authenticates the shared secret from the output of `kyberlib_ake_server_receive()`.
195
+
196
+
See the [macros module documentation](https://docs.rs/kyberlib/latest/kyberlib/index.html#macros) for more details and usage examples.
198
197
199
198
## Errors
200
199
201
200
The KyberLibError enum has two variants:
202
201
203
202
-**InvalidInput** - One or more inputs to a function are incorrectly sized. A possible cause of this is two parties using different security levels while trying to negotiate a key exchange.
203
+
-**InvalidKey** - Error when generating keys.
204
204
-**Decapsulation** - The ciphertext was unable to be authenticated. The shared secret was not decapsulated.
205
-
-**RandomBytesGeneration** - Error trying to fill random bytes (i.e external (hardware) RNG modules can fail).
205
+
-**RandomBytesGeneration** - Error trying to fill random bytes (i.e., external (hardware) RNG modules can fail).
206
206
207
207
## Examples
208
208
@@ -244,7 +244,7 @@ cargo run --example uake
244
244
245
245
### Platform support
246
246
247
-
`kyberlib` is supported and tested on MacOS, Linux, and Windows. The [GitHub Actions][10] shows the platforms in which the `kyberlib` library tests are run.
247
+
`kyberlib`supports a variety of CPU architectures. It is supported and tested on MacOS, Linux, and Windows.
0 commit comments