An IBE (identity based encryption) ciphertext

Methods

  • Decrypt an IBE ciphertext

    For proper operation k_bytes should be the result of calling TransportSecretKey::decrypt where the same derived_public_key_bytes and derivation_id were used when creating the ciphertext (with IBECiphertext::encrypt).

    Returns the plaintext, or Err if decryption failed

    Parameters

    • k_bytes: Uint8Array

    Returns Uint8Array

  • Returns void

  • Serialize this IBE ciphertext

    Returns Uint8Array

  • Deserialize an IBE ciphertext

    Returns Err if the encoding is not valid

    Parameters

    • bytes: Uint8Array

    Returns IBECiphertext

  • Encrypt a message using IBE

    The message can be of arbitrary length

    The seed must be exactly 256 bits (32 bytes) long and should be generated with a cryptographically secure random number generator. Do not reuse the seed for encrypting another message or any other purpose.

    Parameters

    • derived_public_key_bytes: Uint8Array
    • derivation_id: Uint8Array
    • msg: Uint8Array
    • seed: Uint8Array

    Returns IBECiphertext