cmac-0.7.2/.cargo_vcs_info.json0000644000000001420000000000100117420ustar { "git": { "sha1": "600bad5c6921cebc4dd3df420a55c0f0162d4135" }, "path_in_vcs": "cmac" }cmac-0.7.2/CHANGELOG.md000064400000000000000000000037301046102023000123510ustar 00000000000000# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## 0.7.2 (2022-03-14) ### Changed - Do not include large CAVP test vectors in published packages ([#128]) [#128]: https://github.com/RustCrypto/MACs/pull/128 ## 0.7.1 (2022-02-17) ### Fixed - Minimal versions build ([#108]) [#108]: https://github.com/RustCrypto/MACs/pull/108 ## 0.7.0 (2022-02-10) ### Changed - Migrate from `crypto-mac` dependency to `digest v0.10` ([#103]) - Bump `cipher` dependency to v0.4 ([#103]) [#103]: https://github.com/RustCrypto/MACs/pull/103 ## 0.6.0 (2021-04-29) ### Changed - Bump `crypto-mac` crate dependency to v0.11 ([#73]) [#73]: https://github.com/RustCrypto/MACs/pull/73 ## 0.5.1 (2020-10-16) ### Added - Zulip badge ([#64]) [#64]: https://github.com/RustCrypto/MACs/pull/64 ## 0.5.0 (2020-10-16) ### Changed - Bump `crypto-mac` dependency to v0.10 ([#62]) [#62]: https://github.com/RustCrypto/MACs/pull/62 ## 0.4.0 (2020-08-12) ### Changed - Bump `crypto-mac` dependency to v0.9, implement the `FromBlockCipher` trait ([#57]) [#57]: https://github.com/RustCrypto/MACs/pull/57 ## 0.3.1 (2020-08-12) ### Added - Implement `From` ([#54]) - Implement `io::Write` ([#55]) [#54]: https://github.com/RustCrypto/MACs/pull/54 [#55]: https://github.com/RustCrypto/MACs/pull/55 ## 0.3.0 (2020-06-06) ### Changed - Bump `aes` crate dependency to v0.4 ([#40]) - Bump `dbl` crate dependency to v0.3 ([#39]) - Bump `crypto-mac` dependency to v0.8; MSRV 1.41+ ([#30]) - Rename `result` methods to `finalize` ([#38]) - Upgrade to Rust 2018 edition ([#30]) [#40]: https://github.com/RustCrypto/MACs/pull/40 [#39]: https://github.com/RustCrypto/MACs/pull/39 [#38]: https://github.com/RustCrypto/MACs/pull/38 [#30]: https://github.com/RustCrypto/MACs/pull/30 ## 0.2.0 (2018-10-03) ## 0.1.0 (2017-11-26) cmac-0.7.2/Cargo.toml0000644000000030720000000000100077450ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2021" rust-version = "1.56" name = "cmac" version = "0.7.2" authors = ["RustCrypto Developers"] exclude = [ "tests/cavp_large.rs", "tests/data/cavp_aes128_large.blb", ] description = "Generic implementation of Cipher-based Message Authentication Code" documentation = "https://docs.rs/cmac" readme = "README.md" keywords = [ "crypto", "mac", "cmac", "omac", ] categories = [ "cryptography", "no-std", ] license = "MIT OR Apache-2.0" repository = "https://github.com/RustCrypto/MACs" resolver = "1" [package.metadata.docs.rs] all-features = true rustdoc-args = [ "--cfg", "docsrs", ] [dependencies.cipher] version = "0.4.2" [dependencies.dbl] version = "0.3" [dependencies.digest] version = "0.10.3" features = ["mac"] [dev-dependencies.aes] version = "0.8" [dev-dependencies.des] version = "0.8" [dev-dependencies.digest] version = "0.10.3" features = ["dev"] [dev-dependencies.hex-literal] version = "0.3" [dev-dependencies.kuznyechik] version = "0.8" [dev-dependencies.magma] version = "0.8" [features] std = ["digest/std"] zeroize = ["cipher/zeroize"] cmac-0.7.2/Cargo.toml.orig0000644000000015660000000000100107120ustar [package] name = "cmac" version = "0.7.2" description = "Generic implementation of Cipher-based Message Authentication Code" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" edition = "2021" rust-version = "1.56" readme = "README.md" documentation = "https://docs.rs/cmac" repository = "https://github.com/RustCrypto/MACs" keywords = ["crypto", "mac", "cmac", "omac"] categories = ["cryptography", "no-std"] exclude = ["tests/cavp_large.rs", "tests/data/cavp_aes128_large.blb"] [dependencies] digest = { version = "0.10.3", features = ["mac"] } cipher = "0.4.2" dbl = "0.3" [dev-dependencies] digest = { version = "0.10.3", features = ["dev"] } hex-literal = "0.3" aes = "0.8" des = "0.8" kuznyechik = "0.8" magma = "0.8" [features] std = ["digest/std"] zeroize = ["cipher/zeroize"] [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] cmac-0.7.2/Cargo.toml.orig000064400000000000000000000015661046102023000134340ustar 00000000000000[package] name = "cmac" version = "0.7.2" description = "Generic implementation of Cipher-based Message Authentication Code" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" edition = "2021" rust-version = "1.56" readme = "README.md" documentation = "https://docs.rs/cmac" repository = "https://github.com/RustCrypto/MACs" keywords = ["crypto", "mac", "cmac", "omac"] categories = ["cryptography", "no-std"] exclude = ["tests/cavp_large.rs", "tests/data/cavp_aes128_large.blb"] [dependencies] digest = { version = "0.10.3", features = ["mac"] } cipher = "0.4.2" dbl = "0.3" [dev-dependencies] digest = { version = "0.10.3", features = ["dev"] } hex-literal = "0.3" aes = "0.8" des = "0.8" kuznyechik = "0.8" magma = "0.8" [features] std = ["digest/std"] zeroize = ["cipher/zeroize"] [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] cmac-0.7.2/LICENSE-APACHE000064400000000000000000000251411046102023000124640ustar 00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. cmac-0.7.2/LICENSE-MIT000064400000000000000000000020411046102023000121660ustar 00000000000000Copyright (c) 2017 Artyom Pavlov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. cmac-0.7.2/README.md000064400000000000000000000034541046102023000120220ustar 00000000000000# RustCrypto: CMAC [![crate][crate-image]][crate-link] [![Docs][docs-image]][docs-link] ![Apache2/MIT licensed][license-image] ![Rust Version][rustc-image] [![Project Chat][chat-image]][chat-link] [![Build Status][build-image]][build-link] Pure Rust implementation of the [Cipher-based Message Authentication Code (CMAC)][1]. [Documentation][docs-link] ## Minimum Supported Rust Version Rust **1.56** or higher. Minimum supported Rust version can be changed in the future, but it will be done with a minor version bump. ## SemVer Policy - All on-by-default features of this library are covered by SemVer - MSRV is considered exempt from SemVer as noted above ## License Licensed under either of: * [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) * [MIT license](http://opensource.org/licenses/MIT) at your option. ### Contribution Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. [//]: # (badges) [crate-image]: https://img.shields.io/crates/v/cmac.svg [crate-link]: https://crates.io/crates/cmac [docs-image]: https://docs.rs/cmac/badge.svg [docs-link]: https://docs.rs/cmac/ [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg [rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260044-MACs [build-image]: https://github.com/RustCrypto/MACs/workflows/cmac/badge.svg?branch=master&event=push [build-link]: https://github.com/RustCrypto/MACs/actions?query=workflow%3Acmac [//]: # (general links) [1]: https://en.wikipedia.org/wiki/One-key_MAC cmac-0.7.2/src/lib.rs000064400000000000000000000150441046102023000124440ustar 00000000000000//! Generic implementation of [Cipher-based Message Authentication Code (CMAC)][1], //! otherwise known as OMAC1. //! //! # Examples //! We will use AES-128 block cipher from [aes](https://docs.rs/aes) crate. //! //! To get the authentication code: //! //! ```rust //! use aes::Aes128; //! use cmac::{Cmac, Mac}; //! //! // Create `Mac` trait implementation, namely CMAC-AES128 //! let mut mac = Cmac::::new_from_slice(b"very secret key.").unwrap(); //! mac.update(b"input message"); //! //! // `result` has type `Output` which is a thin wrapper around array of //! // bytes for providing constant time equality check //! let result = mac.finalize(); //! // To get underlying array use the `into_bytes` method, but be careful, //! // since incorrect use of the tag value may permit timing attacks which //! // defeat the security provided by the `Output` wrapper //! let tag_bytes = result.into_bytes(); //! ``` //! //! To verify the message: //! //! ```rust //! # use aes::Aes128; //! # use cmac::{Cmac, Mac}; //! let mut mac = Cmac::::new_from_slice(b"very secret key.").unwrap(); //! //! mac.update(b"input message"); //! //! # let tag_bytes = mac.clone().finalize().into_bytes(); //! // `verify` will return `Ok(())` if tag is correct, `Err(MacError)` otherwise //! mac.verify(&tag_bytes).unwrap(); //! ``` //! //! [1]: https://en.wikipedia.org/wiki/One-key_MAC #![no_std] #![doc( html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/26acc39f/logo.svg", html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/26acc39f/logo.svg" )] #![forbid(unsafe_code)] #![cfg_attr(docsrs, feature(doc_cfg))] #![warn(missing_docs, rust_2018_idioms)] pub use digest::{self, Mac}; use cipher::{BlockBackend, BlockCipher, BlockClosure, BlockEncryptMut}; use core::fmt; use dbl::Dbl; use digest::{ block_buffer::Lazy, core_api::{ AlgorithmName, Block, BlockSizeUser, Buffer, BufferKindUser, CoreWrapper, FixedOutputCore, UpdateCore, }, crypto_common::{InnerInit, InnerUser}, generic_array::{ typenum::{IsLess, Le, NonZero, U256}, ArrayLength, GenericArray, }, MacMarker, Output, OutputSizeUser, Reset, }; #[cfg(feature = "zeroize")] use cipher::zeroize::{Zeroize, ZeroizeOnDrop}; /// Generic CMAC instance. pub type Cmac = CoreWrapper>; /// Generic core CMAC instance, which operates over blocks. #[derive(Clone)] pub struct CmacCore where C: BlockCipher + BlockEncryptMut + Clone, Block: Dbl, { cipher: C, state: Block, } impl BlockSizeUser for CmacCore where C: BlockCipher + BlockEncryptMut + Clone, Block: Dbl, { type BlockSize = C::BlockSize; } impl OutputSizeUser for CmacCore where C: BlockCipher + BlockEncryptMut + Clone, Block: Dbl, { type OutputSize = C::BlockSize; } impl InnerUser for CmacCore where C: BlockCipher + BlockEncryptMut + Clone, Block: Dbl, { type Inner = C; } impl MacMarker for CmacCore where C: BlockCipher + BlockEncryptMut + Clone, Block: Dbl, { } impl InnerInit for CmacCore where C: BlockCipher + BlockEncryptMut + Clone, Block: Dbl, { #[inline] fn inner_init(cipher: C) -> Self { let state = Default::default(); Self { cipher, state } } } impl BufferKindUser for CmacCore where C: BlockCipher + BlockEncryptMut + Clone, Block: Dbl, { type BufferKind = Lazy; } impl UpdateCore for CmacCore where C: BlockCipher + BlockEncryptMut + Clone, Block: Dbl, { #[inline] fn update_blocks(&mut self, blocks: &[Block]) { struct Ctx<'a, N: ArrayLength> { state: &'a mut Block, blocks: &'a [Block], } impl<'a, N: ArrayLength> BlockSizeUser for Ctx<'a, N> { type BlockSize = N; } impl<'a, N: ArrayLength> BlockClosure for Ctx<'a, N> { #[inline(always)] fn call>(self, backend: &mut B) { for block in self.blocks { xor(self.state, block); backend.proc_block((self.state).into()); } } } let Self { cipher, state } = self; cipher.encrypt_with_backend_mut(Ctx { state, blocks }) } } impl Reset for CmacCore where C: BlockCipher + BlockEncryptMut + Clone, Block: Dbl, { #[inline(always)] fn reset(&mut self) { self.state = Default::default(); } } impl FixedOutputCore for CmacCore where C: BlockCipher + BlockEncryptMut + Clone, Block: Dbl, C::BlockSize: IsLess, Le: NonZero, { #[inline] fn finalize_fixed_core(&mut self, buffer: &mut Buffer, out: &mut Output) { let Self { state, cipher } = self; let pos = buffer.get_pos(); let buf = buffer.pad_with_zeros(); let mut subkey = Default::default(); cipher.encrypt_block_mut(&mut subkey); let key1 = subkey.dbl(); xor(state, buf); if pos == buf.len() { xor(state, &key1); } else { state[pos] ^= 0x80; let key2 = key1.dbl(); xor(state, &key2); } cipher.encrypt_block_mut(state); out.copy_from_slice(state); } } impl AlgorithmName for CmacCore where C: BlockCipher + BlockEncryptMut + Clone + AlgorithmName, Block: Dbl, { fn write_alg_name(f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str("Cmac<")?; ::write_alg_name(f)?; f.write_str(">") } } impl fmt::Debug for CmacCore where C: BlockCipher + BlockEncryptMut + Clone + AlgorithmName, Block: Dbl, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str("CmacCore<")?; ::write_alg_name(f)?; f.write_str("> { ... }") } } #[cfg(feature = "zeroize")] #[cfg_attr(docsrs, doc(cfg(feature = "zeroize")))] impl Drop for CmacCore where C: BlockCipher + BlockEncryptMut + Clone, Block: Dbl, { fn drop(&mut self) { self.state.zeroize(); } } #[cfg(feature = "zeroize")] #[cfg_attr(docsrs, doc(cfg(feature = "zeroize")))] impl ZeroizeOnDrop for CmacCore where C: BlockCipher + BlockEncryptMut + Clone + ZeroizeOnDrop, Block: Dbl, { } #[inline(always)] fn xor>(buf: &mut GenericArray, data: &GenericArray) { for i in 0..N::USIZE { buf[i] ^= data[i]; } } cmac-0.7.2/tests/data/aes128.blb000064400000000000000000000003031046102023000142700ustar 00000000000000+~(Ҧ O< i)Y7(}ugF k.@=~s*  kMADݝJ(|(k.@=~s*-W }D#x}k.@=~s*-WoEQ0F\ R$EO+A{l7 Q~;Ity6<cmac-0.7.2/tests/data/aes192.blb000064400000000000000000000003131046102023000142720ustar 00000000000000sdR+ybR,k{ }F1ăzg k.@=~s* 1b^a|Q(k.@=~s*-W =uD~@k.@=~s*-WoEQ0F\ R$EO+A{l7 yyMwXYcmac-0.7.2/tests/data/aes256.blb000064400000000000000000000003231046102023000142740ustar 00000000000000 `=q+s}w5,;a-  b{kUFgك k.@=~s* (?E.K7\(k.@=~s*-W g'xJ<;mk.@=~s*-WoEQ0F\ R$EO+A{l7 !Tnij,l1Tcmac-0.7.2/tests/data/cavp_aes128.blb000064400000000000000000000101111046102023000152770ustar 00000000000000 d[/}cgLpf F ~d, \cYW*'A$ ^WRtO۽  :*2Nd3\, MiغPE$ 3T #U5`Kq% Bw͛,؋[^ 7*7ب# sl ' ^E VLN4 sS03a,PPּn urkz0 uϤ2P͍V J I-ܴ_8^&@,>VBx.qoP#\X +*<Z4B@%V LSH; =MV,!⿚@ 0 r i@9@fҫwrħ|a L׽{,Rsk$ _Tko 1@|̖l> L ]s:V>e { 7pJ~Y@Cgke@;؂ ʸ4JE# a+6 6]IwV_fp@NLƘG`*A^dN SLo5?&d]TW@I 5kbh;%HrH9gq9rD.XP3*I +FX"PBŽ-krw-W-.'q1`Q̧}ZnUDd RWi9z> GC'=}$LB¼.EpL_^26h99 1Jt HKG4gBi.GpVg 3kxeܰsl$"M K\!>-{.*B2Wf2s5 6~; hTxBt| wZۆ 45ɚ_&`_Bi:*D/ߧYӏA=ٹkmK :mVm# e3`mR`1B-L3Lꮆ/R(kZ6 `='$< = j΋1LC,7Bx.{|.cݪcӵ|"BqHs=rߊwS6Is\w% 6=Rh*shJB.MX5ƸyaByYb>5G֨-bѰ_94 i<;|o!]BέZlu˨V ='ouJ  )n_ \7sa%` B[/isqo^iB*eK qQJI$%~}xqU2~;"8 -`kfz F~3 :#aJ/GjCec:V:NaG1WM} ij\c!Q J޽8t:gVV\b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Ryum,TO )EX*AJt #EI> WG>z\hg7 !@ w sCp*[k c"^y$tBB $bV =^;&a)v |dCS^ŝ@ mQ h4&|#d ?+ƞMyyF V( g/ī*W[W|/ \qrbQm /p nb8 > #2>*oLG&uZj: @4[ dg G ύAOډ7ͤ0o& dyFaO JkD/VЙ E I#X zQf6\\XW~Yh RhTW/khO8 9ҌٲT>(M/9 4sΌnW ,pT-rꮩ y4pR%Wp˅ ѴL:nP=4-9@ gE, .r UwL?$;_ uWvng&880n( { I,p^ǭSSOw\ ,*U2 L/CXs"`J k >|Ρ@zzي׷N $⏱ X)I;dW= ¤Xg)y3 &SX d[/|b&FBP ʅ @dp *+@NG (E} WO³7zO/vWy : Ӻ; O )3~`j[ >٢^="cubR z]p]12ȩr"8 R kC* |@g֬ϊUkD ]1|zgy$pd'W+ ,WL[m2`7M 4bzIdQ,Ѱ\s  ДT6 Fz,#)T7ga84 %Z g¿I^@Cpm*H %6C 1Ѓ1)2gP"sX( B Oy;FQ[X(! BsEԅ 3 dyg=;*Qb'}vʁ=9 t 1/&@pQӆV f൚1H X)g vߨhF71F>Om޿rRk v˜ J^1=hII^ag Bz9E~+ kf Eud/S *[[1_5DU mŒ[nC Iz u)~eB@K< *bC߶a@zP*`S:Gz# Ok|ǛC> r”[ DQ O/ O/Wmv[k D=mߨ]xID| T! ,bFRJ `qqWu`9 1 LLC2)y g%)L R ȴY =Q6 1@vudX@/=gy =ެ`[pzt  ~5 |n1 E/Xb }*l{bV u2h0 vz%OzW[% Ce8g s0{2 E)28 F S/yHU b&r 8V"d Qz2T񘭺b1Qs mqHg:i@_h gI1Fy ˧QE ]=6pP[%(=PD ;)L/@1 =~5YڿFYf [2JC; a„!PPGi ;a]]| fi[xqIkx%}. nC In4OT B"ʺXycx |^&ТQ нܸM.Tw|Xn'p /WL [m2`;1mdj ~cmac-0.7.2/tests/data/cavp_tdes3.blb000064400000000000000000000114611046102023000153270ustar 000000000000000yECE^Q 0s1gTX2Q%Ն˧@O Kۅ0[>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ar 00000000000000@"3DUfwܺvT2#Eg"3DUfw̻"3DUfw "3DUfw "3DUfw  3oM)`YM޳[7tgcmac-0.7.2/tests/data/magma.blb000064400000000000000000000001141046102023000143470ustar 00000000000000@̻wfUD3"@k< YT J.gL@~ANr 0Żcmac-0.7.2/tests/data/wycheproof-aes128.blb000064400000000000000000000016161046102023000164630ustar 00000000000000 Oǽ0ff zW4z\ &gH ? V;2RCzc Q=' 묘-+h& o_rw~{cP( >uh9@#|Ƀ 2nj:`RB b WPhV],ʂl C6rwP s ;b$#,B5 H@)%&Y- a#V 7V n1 ]ᖬ~Ha@ v/{L;Sn2gs2 H>AUĵs{Z23mY 2|Y7a I9Q0Ѿ/ U_F!Qicg` 9| 0B2S;LbRD Of7ITKŏ_ em`ݱm S{>Dfyd vg.l)D x\Î }Q4r SQn||%SG @/sG&3 fL? 0{"&`;mРM; L$G` T҂!ñ.>0K<^8DOsUn/%?LT֑eE ~X/JQ?Yq[fK Ӑ.ЙlW"ro8@Ԟ𘪎0@ؓEl)@@HNؠ U> E"^2$3Уcmac-0.7.2/tests/data/wycheproof-aes192.blb000064400000000000000000000020561046102023000164630ustar 000000000000000=kmpv[q2 61 ,I^ŶftN’ 0T)t45‰;3WJ=.jX ;?Q :~*0ˆ&2DJeyU~ _ڌ@ 0kUhG k ?ח\P).30 PS|™;W0ZEa[>|dD:WR=Ep|+gD? ٠M'a/{CQucmac-0.7.2/tests/data/wycheproof-aes256.blb000064400000000000000000000023161046102023000164630ustar 00000000000000@{6j!\"#?ڪt:˟xp=nC sl{V}tǧ @TlOʷ s|dr@ GH,-RCZ5@;k8}M|qh85SYNRG?_f N1f3ILl13 n( h ? <偺;@,o-whidfc{ ="p{MkgY .Q rz5a}@]Q)@(6WSj蒞RnA*NS Z Lf%7zM<@=](tXer%3?k i~6/0W{I ejA#閾@1LlCBTg*|5l!HYΆ]j:|3 hzq7Zi@a.xCήaԖ%IOS ΦQ+96 7_tZ/@ȱ K ZK#\+&S @s!o- nq'%xݟDFd7Ed"${l>ܿՑ># }=n) @'%u(pd ],]UR0DBpugk3n ̲Y p@o3V <!"i@~Mj&|neO($s[[ _})~K ? cmac-0.7.2/tests/mod.rs000064400000000000000000000031701046102023000130250ustar 00000000000000use aes::{Aes128, Aes192, Aes256}; use cmac::Cmac; use des::{TdesEde2, TdesEde3}; use digest::new_resettable_mac_test; use kuznyechik::Kuznyechik; use magma::Magma; // Tests from NIST SP 800-38B: // https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines/ new_resettable_mac_test!(cmac_aes128_nist, "aes128", Cmac); new_resettable_mac_test!(cmac_aes192_nist, "aes192", Cmac); new_resettable_mac_test!(cmac_aes256_nist, "aes256", Cmac); // Tests from CAVP (excluding all 64 KiB vectors for AES-128 except the first one): // https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/CAVP-TESTING-BLOCK-CIPHER-MODES new_resettable_mac_test!(cmac_aes128_cavp, "cavp_aes128", Cmac, trunc_left); new_resettable_mac_test!(cmac_aes192_cavp, "cavp_aes192", Cmac, trunc_left); new_resettable_mac_test!(cmac_aes256_cavp, "cavp_aes256", Cmac, trunc_left); new_resettable_mac_test!(cmac_tdes2_cavp, "cavp_tdes2", Cmac, trunc_left); new_resettable_mac_test!(cmac_tdes3_cavp, "cavp_tdes3", Cmac, trunc_left); // Tests from Project Wycheproof: // https://github.com/google/wycheproof new_resettable_mac_test!(cmac_aes128_wycheproof, "wycheproof-aes128", Cmac); new_resettable_mac_test!(cmac_aes192_wycheproof, "wycheproof-aes192", Cmac); new_resettable_mac_test!(cmac_aes256_wycheproof, "wycheproof-aes256", Cmac); // Test from GOST R 34.13-2015: // https://tc26.ru/standard/gost/GOST_R_3413-2015.pdf new_resettable_mac_test!(cmac_kuznyechik_gost, "kuznyechik", Cmac); new_resettable_mac_test!(cmac_magma_gost, "magma", Cmac);