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
The KyberLib crate provides several macros to simplify common cryptographic operations:
183
+
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.
198
+
184
199
## Errors
185
200
186
201
The KyberLibError enum has two variants:
@@ -189,8 +204,6 @@ The KyberLibError enum has two variants:
189
204
-**Decapsulation** - The ciphertext was unable to be authenticated. The shared secret was not decapsulated.
190
205
-**RandomBytesGeneration** - Error trying to fill random bytes (i.e external (hardware) RNG modules can fail).
191
206
192
-
![Divider][01]
193
-
194
207
## Examples
195
208
196
209
To get started with `kyberlib`, you can use the examples provided in the
@@ -229,47 +242,9 @@ Run the following command in your terminal from the project root directory.
229
242
cargo run --example uake
230
243
```
231
244
232
-
![Divider][01]
233
-
234
245
### Platform support
235
246
236
-
`kyberlib` is supported and tested on the following platforms:
237
-
238
-
### Tier 1 platforms 🏆
239
-
240
-
|| Operating System | Target | Description |
241
-
| --- | --- | --- | --- |
242
-
| ✅ | Linux | aarch64-unknown-linux-gnu | 64-bit Linux systems on ARM architecture |
243
-
| ✅ | Windows | i686-pc-windows-gnu | 32-bit Windows systems using the GNU toolchain |
244
-
| ✅ | Windows | i686-pc-windows-msvc | 32-bit Windows systems using the Microsoft Visual C toolchain |
245
-
| ✅ | Linux | i686-unknown-linux-gnu | 32-bit Linux systems (kernel 3.2+, glibc 2.17+) |
246
-
| ✅ | macOS | x86_64-apple-darwin | 64-bit macOS systems (10.7 Lion or later) |
247
-
| ✅ | Windows | x86_64-pc-windows-gnu | 64-bit Windows systems using the GNU toolchain |
248
-
| ✅ | Windows | x86_64-pc-windows-msvc | 64-bit Windows systems using the Microsoft Visual C toolchain |
249
-
| ✅ | Linux | x86_64-unknown-linux-gnu | 64-bit Linux systems (kernel 2.6.32+, glibc 2.11+) |
250
-
251
-
### Tier 2 platforms 🥈
252
-
253
-
|| Operating System | Target | Description |
254
-
| --- | --- | --- | --- |
255
-
| ✅ | Linux | aarch64-apple-darwin | 64-bit macOS on Apple Silicon |
256
-
| ✅ | Windows | aarch64-pc-windows-msvc | 64-bit Windows on ARM architecture using the Microsoft Visual C toolchain |
257
-
| ✅ | Linux | aarch64-unknown-linux-musl | 64-bit Linux on ARM architecture with musl libc |
258
-
| ✅ | Linux | arm-unknown-linux-gnueabi | ARMv6 Linux systems (kernel 3.2, glibc 2.17) |
259
-
| ✅ | Linux | arm-unknown-linux-gnueabihf | ARMv7 Linux systems, hardfloat (kernel 3.2, glibc 2.17) |
260
-
| ✅ | Linux | armv7-unknown-linux-gnueabihf | ARMv7 Linux systems, hardfloat (kernel 3.2, glibc 2.17) |
261
-
| ✅ | Linux | powerpc-unknown-linux-gnu | PowerPC Linux systems (kernel 3.2, glibc 2.17) |
262
-
| ✅ | Linux | powerpc64-unknown-linux-gnu | PowerPC64 Linux systems (kernel 3.2, glibc 2.17) |
263
-
| ✅ | Linux | powerpc64le-unknown-linux-gnu | PowerPC64le Linux systems (kernel 3.2, glibc 2.17) |
264
-
| ✅ | Linux | riscv64gc-unknown-linux-gnu | RISC-V Linux systems (kernel 3.2, glibc 2.17) |
265
-
| ✅ | Linux | s390x-unknown-linux-gnu | s390x Linux systems (kernel 3.2, glibc 2.17) |
266
-
| ✅ | Linux | x86_64-unknown-freebsd | 64-bit FreeBSD systems on x86-64 architecture |
267
-
| ✅ | Linux | x86_64-unknown-linux-musl | 64-bit Linux systems (kernel 2.6.32+, musl libc) |
268
-
269
-
The [GitHub Actions][10] shows the platforms in which the `kyberlib`
270
-
library tests are run.
271
-
272
-
![Divider][01]
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.
273
248
274
249
### Documentation
275
250
@@ -281,15 +256,11 @@ library tests are run.
281
256
For transparency into our release cycle and in striving to maintain
0 commit comments