#encryption #ecc #no-std

no-std ibe

Identity Based Encryption schemes on the BLS12-381 pairing-friendly elliptic curve

12 releases

0.3.0 Mar 16, 2023
0.2.3 Nov 24, 2022
0.2.2 Jun 28, 2022
0.2.0-beta.0 Mar 2, 2022
0.1.2 Nov 26, 2019

#1124 in Cryptography

Download history 31/week @ 2023-07-17 27/week @ 2023-07-24 19/week @ 2023-07-31 25/week @ 2023-08-07 40/week @ 2023-08-14 14/week @ 2023-08-21 40/week @ 2023-08-28 44/week @ 2023-09-04 22/week @ 2023-09-11 52/week @ 2023-09-18 85/week @ 2023-09-25 25/week @ 2023-10-02 22/week @ 2023-10-09 33/week @ 2023-10-16 28/week @ 2023-10-23 46/week @ 2023-10-30

131 downloads per month
Used in 3 crates

MIT license

2.5K SLoC


Collection of Identity Based Encryption (IBE) schemes on the BLS12-381 pairing-friendly elliptic curve in Rust. This crate contains both identity-based encryption schemes (IBEs, see src/pke) and identity-based key encapsulation mechanisms (IBKEMs, see src/kem). References to papers appear in the respective source files.

This crate contains the following schemes (in chronological order of publication):

  • Waters (IND-ID-CPA IBE),
  • Boyen-Waters (IND-sID-CPA IBE),
  • Waters-Naccache (IND-ID-CPA IBE),
  • Kiltz-Vahlis IBE1 (IND-CCA2 IBKEM),

Technical notes

  • This implementation has not (yet) been reviewed or audited. Use at your own risk.
  • Uses Keccak for hashing to identities, hashing to secrets and as symmetric primitives for the Fujisaki-Okamoto transform.
  • Compiles succesfully on Rust Stable.
  • Does not use the Rust standard library (no-std).
  • The structure of the byte serialisation of the various datastructures is not guaranteed to remain constant between releases of this library.
  • All operations in this library are implemented to run in constant time.
  • The performance of this library mostly depends on the arithmetic of the underlying curve operations, BLS12-381. Any new optimizations to the original library could significantly increase performance of the schemes in this crate. It should therefore be considered to merge these optimizations into this crate as well (via the pg-curve crate).


~27K SLoC