-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from kanav99/rename
Rename to AES
- Loading branch information
Showing
10 changed files
with
40 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name = "Rijndael" | ||
name = "AES" | ||
uuid = "5a3fb44e-d90d-11e9-053b-99581e1bac63" | ||
authors = ["Kanav Gupta <[email protected]>"] | ||
version = "0.1.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
using Rijndael, BenchmarkTools, Test | ||
using AES, BenchmarkTools, Test | ||
|
||
# AES128 | ||
k=[0x54,0x68,0x61,0x74,0x73,0x20,0x6D,0x79,0x20,0x4B,0x75,0x6E,0x67,0x20,0x46,0x75] | ||
p=[0x54,0x77,0x6F,0x20,0x4F,0x6E,0x65,0x20,0x4E,0x69,0x6E,0x65,0x20,0x54,0x77,0x6F] | ||
c=[0x29,0xC3,0x50,0x5F,0x57,0x14,0x20,0xF6,0x40,0x22,0x99,0xB3,0x1A,0x02,0xD7,0x3A] | ||
key = AES128Key(k) | ||
|
||
@test c == Rijndael.AESEncryptBlock(p, key) | ||
@test p == Rijndael.AESDecryptBlock(c, key) | ||
@test p == Rijndael.AESDecryptBlock(Rijndael.AESEncryptBlock(p,key),key) | ||
@test c == AES.AESEncryptBlock(p, key) | ||
@test p == AES.AESDecryptBlock(c, key) | ||
@test p == AES.AESDecryptBlock(AES.AESEncryptBlock(p,key),key) | ||
|
||
# Performance Checks | ||
cache = Rijndael.gen_cache(key) | ||
@btime Rijndael.AESEncryptBlock!(p, p, key, cache) | ||
@btime Rijndael.AESDecryptBlock!(c, c, key, cache) | ||
cache = AES.gen_cache(key) | ||
@btime AES.AESEncryptBlock!(p, p, key, cache) | ||
@btime AES.AESDecryptBlock!(c, c, key, cache) | ||
|
||
# AES192 | ||
k = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17] | ||
p = [0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF] | ||
c = [0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0, 0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91] | ||
key = AES192Key(k) | ||
|
||
@test c == Rijndael.AESEncryptBlock(p, key) | ||
@test p == Rijndael.AESDecryptBlock(c, key) | ||
@test p == Rijndael.AESDecryptBlock(Rijndael.AESEncryptBlock(p,key),key) | ||
@test c == AES.AESEncryptBlock(p, key) | ||
@test p == AES.AESDecryptBlock(c, key) | ||
@test p == AES.AESDecryptBlock(AES.AESEncryptBlock(p,key),key) | ||
|
||
# Performance Checks | ||
cache = Rijndael.gen_cache(key) | ||
@btime Rijndael.AESEncryptBlock!(p, p, key, cache) | ||
@btime Rijndael.AESDecryptBlock!(c, c, key, cache) | ||
cache = AES.gen_cache(key) | ||
@btime AES.AESEncryptBlock!(p, p, key, cache) | ||
@btime AES.AESDecryptBlock!(c, c, key, cache) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7dcef2c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
7dcef2c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/13857
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: