@li0ard/gost - v0.1.8
    Preparing search index...

    Class Magma

    Magma cipher

    Described by GOST 28147-89 (RFC 5830) in 1989 (Uses LE byte order, no S-Box'es defined)

    Revised by GOST R 34.12-2015 (RFC 8891) in 2015 (Uses BE byte order and fixed S-Box)

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Magma (GOST R 34.12-2015 and GOST 28147-89) cipher

      Parameters

      • key: TArg<Uint8Array<ArrayBufferLike>>

        Encryption key

      • sbox: TArg<Uint8Array<ArrayBufferLike>> = ID_TC26_GOST_28147_PARAM_Z

        S-Box

      • isLegacy: boolean = false

        Use GOST 28147-89 instead of GOST R 34.12-2015?

      Returns Magma

    Properties

    blockSize: 8 = BLOCKSIZE

    Block size

    isLegacy: boolean = false

    Use GOST 28147-89 instead of GOST R 34.12-2015?

    keySize: 32

    Key size

    Methods

    • Decrypt block

      Parameters

      • ciphertext: TArg<Uint8Array<ArrayBufferLike>>

      Returns Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>

    • Encrypt block

      Parameters

      • plaintext: TArg<Uint8Array<ArrayBufferLike>>

      Returns Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>