Shamir-Rivest-Adleman (SRA) key exchange object.

Constructors

Properties

decryptionKey: DecryptionKey

Decryption Key of the SRA object, which can be used to decrypt message

encryptionKey: EncryptionKey

Encryption Key of the SRA object, which can be used to encrypt message

publicKey: PublicKey

Public Key of the SRA object, which can be shared with other peers

Methods

  • Decrypt the cipher using the decryption key

    Parameters

    • cipher: bigint

      the cipher in bigint

    Returns bigint

    the decrypted message in bigint

  • Encrypt the message using the encryption key

    Parameters

    • message: bigint

      plain text message represented in bigint

    Returns bigint

    the cipher in bigint