/** * Implementation of GOST R 34.12-2015 ([RFC 8891](https://datatracker.ietf.org/doc/html/rfc8891.html)) and GOST 28147-89 ([RFC 5830](https://datatracker.ietf.org/doc/html/rfc5830.html)) * "Magma" block ciphers * * Differences between GOST R 34.12-2015 and GOST 28147-89: * - GOST R 34.12-2015 uses fixed S-Box (`ID_TC26_GOST_28147_PARAM_Z`) * - GOST R 34.12-2015 uses BE byte order (instead of LE in GOST 28147-89) * @module */ import { type TArg, type TRet } from "@noble/curves/utils.js"; import type { Cipher } from "../types.js"; /** Magma (GOST R 34.12-2015 and GOST 28147-89) cipher */ export declare class Magma implements Cipher { private key; private sbox; isLegacy: boolean; readonly keySize = 32; readonly blockSize = 8; /** * Magma (GOST R 34.12-2015 and GOST 28147-89) cipher * @param key Encryption key * @param sbox S-Box * @param isLegacy Use GOST 28147-89 instead of GOST R 34.12-2015? */ constructor(key: TArg, sbox?: TArg, isLegacy?: boolean); proceedBlock(block: TArg, sequence: number[]): TRet; encrypt(plaintext: TArg): TRet; decrypt(ciphertext: TArg): TRet; } export { magmaSboxes, magmaKeySequences } from "./const.js";