| author | |
| committer | |
| log | c9d6f8b5058ba0df3bf281a3be3a3570c2219754 |
| tree | 949556a5ffc518536676163159631749d4b5c9fc |
| parent | 6188cb8e50882a55c90578114556c6d1b7073e9d |
| signature |
The construction is likely to change before standardization3 files changed, 0 insertions(+), 49 deletions(-)
lib/std/crypto.zig-11| ... | @@ -58,20 +58,9 @@ pub const auth = struct { | ... | @@ -58,20 +58,9 @@ pub const auth = struct { |
| 58 | pub const siphash = @import("crypto/siphash.zig"); | 58 | pub const siphash = @import("crypto/siphash.zig"); |
| 59 | pub const aegis = struct { | 59 | pub const aegis = struct { |
| 60 | const variants = @import("crypto/aegis.zig"); | 60 | const variants = @import("crypto/aegis.zig"); |
| 61 | pub const Aegis128X4Mac = variants.Aegis128X4Mac; | ||
| 62 | pub const Aegis128X2Mac = variants.Aegis128X2Mac; | ||
| 63 | pub const Aegis128LMac = variants.Aegis128LMac; | 61 | pub const Aegis128LMac = variants.Aegis128LMac; |
| 64 | |||
| 65 | pub const Aegis256X4Mac = variants.Aegis256X4Mac; | ||
| 66 | pub const Aegis256X2Mac = variants.Aegis256X2Mac; | ||
| 67 | pub const Aegis256Mac = variants.Aegis256Mac; | 62 | pub const Aegis256Mac = variants.Aegis256Mac; |
| 68 | |||
| 69 | pub const Aegis128X4Mac_128 = variants.Aegis128X4Mac_128; | ||
| 70 | pub const Aegis128X2Mac_128 = variants.Aegis128X2Mac_128; | ||
| 71 | pub const Aegis128LMac_128 = variants.Aegis128LMac_128; | 63 | pub const Aegis128LMac_128 = variants.Aegis128LMac_128; |
| 72 | |||
| 73 | pub const Aegis256X4Mac_128 = variants.Aegis256X4Mac_128; | ||
| 74 | pub const Aegis256X2Mac_128 = variants.Aegis256X2Mac_128; | ||
| 75 | pub const Aegis256Mac_128 = variants.Aegis256Mac_128; | 64 | pub const Aegis256Mac_128 = variants.Aegis256Mac_128; |
| 76 | }; | 65 | }; |
| 77 | pub const cmac = @import("crypto/cmac.zig"); | 66 | pub const cmac = @import("crypto/cmac.zig"); |
lib/std/crypto/aegis.zig-34| ... | @@ -562,28 +562,6 @@ pub const Aegis128X2Mac = AegisMac(Aegis128X2_256); | ... | @@ -562,28 +562,6 @@ pub const Aegis128X2Mac = AegisMac(Aegis128X2_256); |
| 562 | /// - It has a large security margin against internal collisions. | 562 | /// - It has a large security margin against internal collisions. |
| 563 | pub const Aegis128LMac = AegisMac(Aegis128L_256); | 563 | pub const Aegis128LMac = AegisMac(Aegis128L_256); |
| 564 | 564 | ||
| 565 | /// The `Aegis256X4Mac` message authentication function has a 256-bit key size, | ||
| 566 | /// and outputs 256 bit tags. Unless theoretical multi-target attacks are a | ||
| 567 | /// concern, the AEGIS-128L variant should be preferred. | ||
| 568 | /// AEGIS' large state, non-linearity and non-invertibility provides the | ||
| 569 | /// following properties: | ||
| 570 | /// - 256 bit security against forgery. | ||
| 571 | /// - Recovering the secret key from the state would require ~2^256 attempts, | ||
| 572 | /// which is infeasible for any practical adversary. | ||
| 573 | /// - It has a large security margin against internal collisions. | ||
| 574 | pub const Aegis256X4Mac = AegisMac(Aegis256X4_256); | ||
| 575 | |||
| 576 | /// The `Aegis256X2Mac` message authentication function has a 256-bit key size, | ||
| 577 | /// and outputs 256 bit tags. Unless theoretical multi-target attacks are a | ||
| 578 | /// concern, the AEGIS-128L variant should be preferred. | ||
| 579 | /// AEGIS' large state, non-linearity and non-invertibility provides the | ||
| 580 | /// following properties: | ||
| 581 | /// - 256 bit security against forgery. | ||
| 582 | /// - Recovering the secret key from the state would require ~2^256 attempts, | ||
| 583 | /// which is infeasible for any practical adversary. | ||
| 584 | /// - It has a large security margin against internal collisions. | ||
| 585 | pub const Aegis256X2Mac = AegisMac(Aegis256X2_256); | ||
| 586 | |||
| 587 | /// The `Aegis256Mac` message authentication function has a 256-bit key size, | 565 | /// The `Aegis256Mac` message authentication function has a 256-bit key size, |
| 588 | /// and outputs 256 bit tags. Unless theoretical multi-target attacks are a | 566 | /// and outputs 256 bit tags. Unless theoretical multi-target attacks are a |
| 589 | /// concern, the AEGIS-128L variant should be preferred. | 567 | /// concern, the AEGIS-128L variant should be preferred. |
| ... | @@ -595,21 +573,9 @@ pub const Aegis256X2Mac = AegisMac(Aegis256X2_256); | ... | @@ -595,21 +573,9 @@ pub const Aegis256X2Mac = AegisMac(Aegis256X2_256); |
| 595 | /// - It has a large security margin against internal collisions. | 573 | /// - It has a large security margin against internal collisions. |
| 596 | pub const Aegis256Mac = AegisMac(Aegis256_256); | 574 | pub const Aegis256Mac = AegisMac(Aegis256_256); |
| 597 | 575 | ||
| 598 | /// AEGIS-128X4 MAC with 128-bit tags | ||
| 599 | pub const Aegis128X4Mac_128 = AegisMac(Aegis128X4); | ||
| 600 | |||
| 601 | /// AEGIS-128X2 MAC with 128-bit tags | ||
| 602 | pub const Aegis128X2Mac_128 = AegisMac(Aegis128X2); | ||
| 603 | |||
| 604 | /// AEGIS-128L MAC with 128-bit tags | 576 | /// AEGIS-128L MAC with 128-bit tags |
| 605 | pub const Aegis128LMac_128 = AegisMac(Aegis128L); | 577 | pub const Aegis128LMac_128 = AegisMac(Aegis128L); |
| 606 | 578 | ||
| 607 | /// AEGIS-256X4 MAC with 128-bit tags | ||
| 608 | pub const Aegis256X4Mac_128 = AegisMac(Aegis256X4); | ||
| 609 | |||
| 610 | /// AEGIS-256X2 MAC with 128-bit tags | ||
| 611 | pub const Aegis256X2Mac_128 = AegisMac(Aegis256X2); | ||
| 612 | |||
| 613 | /// AEGIS-256 MAC with 128-bit tags | 579 | /// AEGIS-256 MAC with 128-bit tags |
| 614 | pub const Aegis256Mac_128 = AegisMac(Aegis256); | 580 | pub const Aegis256Mac_128 = AegisMac(Aegis256); |
| 615 | 581 |
lib/std/crypto/benchmark.zig-4| ... | @@ -72,10 +72,6 @@ const macs = [_]Crypto{ | ... | @@ -72,10 +72,6 @@ const macs = [_]Crypto{ |
| 72 | Crypto{ .ty = crypto.auth.siphash.SipHash64(1, 3), .name = "siphash-1-3" }, | 72 | Crypto{ .ty = crypto.auth.siphash.SipHash64(1, 3), .name = "siphash-1-3" }, |
| 73 | Crypto{ .ty = crypto.auth.siphash.SipHash128(2, 4), .name = "siphash128-2-4" }, | 73 | Crypto{ .ty = crypto.auth.siphash.SipHash128(2, 4), .name = "siphash128-2-4" }, |
| 74 | Crypto{ .ty = crypto.auth.siphash.SipHash128(1, 3), .name = "siphash128-1-3" }, | 74 | Crypto{ .ty = crypto.auth.siphash.SipHash128(1, 3), .name = "siphash128-1-3" }, |
| 75 | Crypto{ .ty = crypto.auth.aegis.Aegis128X4Mac, .name = "aegis-128x4 mac" }, | ||
| 76 | Crypto{ .ty = crypto.auth.aegis.Aegis256X4Mac, .name = "aegis-256x4 mac" }, | ||
| 77 | Crypto{ .ty = crypto.auth.aegis.Aegis128X2Mac, .name = "aegis-128x2 mac" }, | ||
| 78 | Crypto{ .ty = crypto.auth.aegis.Aegis256X2Mac, .name = "aegis-256x2 mac" }, | ||
| 79 | Crypto{ .ty = crypto.auth.aegis.Aegis128LMac, .name = "aegis-128l mac" }, | 75 | Crypto{ .ty = crypto.auth.aegis.Aegis128LMac, .name = "aegis-128l mac" }, |
| 80 | Crypto{ .ty = crypto.auth.aegis.Aegis256Mac, .name = "aegis-256 mac" }, | 76 | Crypto{ .ty = crypto.auth.aegis.Aegis256Mac, .name = "aegis-256 mac" }, |
| 81 | Crypto{ .ty = crypto.auth.cmac.CmacAes128, .name = "aes-cmac" }, | 77 | Crypto{ .ty = crypto.auth.cmac.CmacAes128, .name = "aes-cmac" }, |