|
cryptal
latest
Cryptography Abstraction Layer
|
Inheritance diagram for fpoirotte\Cryptal\DefaultAlgorithms\Umac:Public Member Functions | |
| __construct (MacEnum $macAlgorithm, SubAlgorithmAbstractEnum $innerAlgorithm, $key, $nonce= '') | |
Public Member Functions inherited from fpoirotte\Cryptal\AbstractContextBasedAlgorithm | |
| __toString () | |
| finalize ($raw=false) | |
| update ($data) | |
Public Member Functions inherited from fpoirotte\Cryptal\ContextBasedInterface | |
| __toString () | |
| finalize ($raw=false) | |
| update ($data) | |
Public Attributes | |
| const | PRIME_128 = '0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF61' |
| 128-bits prime number, in hexadecimal notation. | |
| const | PRIME_36 = '0x0000000FFFFFFFFB' |
| 36-bits prime number, in hexadecimal notation. | |
| const | PRIME_64 = '0xFFFFFFFFFFFFFFC5' |
| 64-bits prime number, in hexadecimal notation. | |
Protected Member Functions | |
| internalFinalize () | |
| internalUpdate ($data) | |
| KDF ($index, $numbytes) | |
| l1Hash ($k, $m) | |
| l2Hash ($k, $m) | |
| l3Hash ($k1, $k2, $m) | |
| NH ($k_i, $m, $len) | |
| PDF ($nonce) | |
| POLY ($wordbits, $maxwordrange, $k, $m) | |
| UHASH ($m) | |
Protected Member Functions inherited from fpoirotte\Cryptal\AbstractContextBasedAlgorithm | |
| internalFinalize () | |
| internalUpdate ($data) | |
Protected Attributes | |
| $blkSize | |
| Block size for the cipher. | |
| $cipher | |
| Cipher algorithm used to encrypt data. | |
| $taglen | |
| Length of tags generated by this instance. | |
Static Protected Attributes | |
| static | $twop32 |
| = 2**32 | |
| static | $twop64 |
| = 2**64 | |
Private Attributes | |
| $key | |
| Secret key. | |
| $nonce | |
| Nonce. | |
Additional Inherited Members | |
Static Public Member Functions inherited from fpoirotte\Cryptal\Implementers\AbstractMac | |
| static | mac (MacEnum $macAlgorithm, SubAlgorithmAbstractEnum $innerAlgorithm, $key, $data, $nonce= '', $raw=false) |
| fpoirotte\Cryptal\DefaultAlgorithms\Umac::__construct | ( | MacEnum | $macAlgorithm, |
| SubAlgorithmAbstractEnum | $innerAlgorithm, | ||
| $key, | |||
$nonce = '' |
|||
| ) |
Construct a new context to generate a Message Authentication Code.
| MacEnum | $macAlgorithm | Algorithm to use to produce the message authentication code. |
| SubAlgorithmAbstractEnum | $innerAlgorithm | Inner algorithm used during generation. This should be either an instance of CipherEnum or MacEnum, depending on the value for the $macAlgorithm parameter. |
| string | $key | Secret key used to produce the Message Authentication Code. |
| string | $nonce | (optional) Nonce used to randomize the output. |
Implements fpoirotte\Cryptal\Implementers\MacInterface.
Definition at line 50 of file Umac.php.
References fpoirotte\Cryptal\DefaultAlgorithms\Umac\$blkSize, fpoirotte\Cryptal\DefaultAlgorithms\Umac\$cipher, fpoirotte\Cryptal\DefaultAlgorithms\Umac\$key, fpoirotte\Cryptal\DefaultAlgorithms\Umac\$nonce, and fpoirotte\Cryptal\DefaultAlgorithms\Umac\$taglen.