Coursera 的密碼學課程功課。
僅供參考。
- Many Time Attack - 2020-10-22
- Hashing Videos - 2020-12-07
- Padding Oracle Attack - 2020-12-14
- Meet In Middle Attack in RSA - 2020-12-21
- Close Factor Attack in RSA - 2020-12-29
$ npm install
先下載該有的檔案,然後執行下列程式碼。
# many time attack on one time padding
$ npm run many-time-attack
# hashing video
$ npm run hash-video
# padding oracle attack
$ npm run padding-oracle-attack
# meet in middle in RSA
$ npm run rsa-meet-in-middle-attack
# close factor in RSA
$ npm run rsa-close-factor-attack
# test all
$ npm run test
# test playground, do whatever you want!
$ npm run playground
data.json
: object withtrain
,test
Example:
{
"train": ["123", "456"],
"test": ["789"]
}
data.json
: object withtest
,check
(optional), represent filename of videos (in same folder).- Checking MAC video
- Testing MAC video
Example:
{
"test": {
"video": "test.mp4"
},
"check": {
"video": "check.mp4",
"tag": "123"
}
}
data.json
: object withurl
,path
,queryKey
,cypher
,decrypted
(optional)
Example:
{
"url": "http://crypto-class.appspot.com",
"path": "/po",
"queryKey": "er",
"cypher": "f20bdba6ff29eed7b046d1df9fb7000058b1ffb4210a580f748b4ac714c001bd"
}
data.json
: object withg
,h
,p
,keySize
Example:
{
"g": "2",
"h": "7",
"p": "13",
"keySize": 4
}
data.json
: array of object withN
,bound
Example:
[
{
"N": "323",
"bound": 1
},
{
"N": "232166152",
"bound": [1, 100]
},
{
"N": "622288097498926496141095869268883999563096063592498055290461",
"3p+2q": true
}
]
請看 LICENSE。
- Multi threads: workerpool
- Python