Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
b4021a7a
Commit
b4021a7a
authored
Oct 27, 2002
by
James Morris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CRYPTO]: Run tcrypt through lindent, plus doc update.
parent
612893c0
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
414 additions
and
345 deletions
+414
-345
crypto/tcrypt.c
crypto/tcrypt.c
+383
-331
crypto/tcrypt.h
crypto/tcrypt.h
+28
-14
include/linux/crypto.h
include/linux/crypto.h
+3
-0
No files found.
crypto/tcrypt.c
View file @
b4021a7a
This diff is collapsed.
Click to expand it.
crypto/tcrypt.h
View file @
b4021a7a
...
@@ -59,7 +59,8 @@ struct md4_testvec {
...
@@ -59,7 +59,8 @@ struct md4_testvec {
0x1c
,
0xe6
,
0x27
,
0xe1
,
0x53
,
0xe7
,
0xf0
,
0xe4
}
0x1c
,
0xe6
,
0x27
,
0xe1
,
0x53
,
0xe7
,
0xf0
,
0xe4
}
},
},
{
"12345678901234567890123456789012345678901234567890123456789012345678901234567890"
,
{
"123456789012345678901234567890123456789012345678901234567890123"
"45678901234567890"
,
{
0xe3
,
0x3b
,
0x4d
,
0xdc
,
0x9c
,
0x38
,
0xf2
,
0x19
,
{
0xe3
,
0x3b
,
0x4d
,
0xdc
,
0x9c
,
0x38
,
0xf2
,
0x19
,
0x9c
,
0x3e
,
0x7b
,
0x16
,
0x4f
,
0xcc
,
0x05
,
0x36
}
0x9c
,
0x3e
,
0x7b
,
0x16
,
0x4f
,
0xcc
,
0x05
,
0x36
}
},
},
...
@@ -146,7 +147,8 @@ struct hmac_md5_testvec hmac_md5_tv_template[] =
...
@@ -146,7 +147,8 @@ struct hmac_md5_testvec hmac_md5_tv_template[] =
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0x00
},
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0xdd
,
0x00
},
{
0x56
,
0xbe
,
0x34
,
0x52
,
0x1d
,
0x14
,
0x4c
,
0x88
,
{
0x56
,
0xbe
,
0x34
,
0x52
,
0x1d
,
0x14
,
0x4c
,
0x88
,
0xdb
,
0xb8
,
0xc7
,
0x33
,
0xf0
,
0xe8
,
0xb3
,
0xf6
}
0xdb
,
0xb8
,
0xc7
,
0x33
,
0xf0
,
0xe8
,
0xb3
,
0xf6
}
...
@@ -162,7 +164,8 @@ struct hmac_md5_testvec hmac_md5_tv_template[] =
...
@@ -162,7 +164,8 @@ struct hmac_md5_testvec hmac_md5_tv_template[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aa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0x00
},
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0x00
},
"Test Using Larger Than Block-Size Key - Hash Key First"
,
"Test Using Larger Than Block-Size Key - Hash Key First"
,
...
@@ -202,9 +206,11 @@ struct hmac_md5_testvec hmac_md5_tv_template[] =
...
@@ -202,9 +206,11 @@ struct hmac_md5_testvec hmac_md5_tv_template[] =
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0x00
},
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0x00
},
"Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data"
,
"Test Using Larger Than Block-Size Key and Larger Than One "
"Block-Size Data"
,
{
0x6f
,
0x63
,
0x0f
,
0xad
,
0x67
,
0xcd
,
0xa0
,
0xee
,
{
0x6f
,
0x63
,
0x0f
,
0xad
,
0x67
,
0xcd
,
0xa0
,
0xee
,
0x1f
,
0xb1
,
0xf5
,
0x62
,
0xdb
,
0x3a
,
0xa5
,
0x3e
}
0x1f
,
0xb1
,
0xf5
,
0x62
,
0xdb
,
0x3a
,
0xa5
,
0x3e
}
...
@@ -226,7 +232,8 @@ struct hmac_sha1_testvec {
...
@@ -226,7 +232,8 @@ struct hmac_sha1_testvec {
{
{
{
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
{
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x00
},
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x0b
,
0x00
},
"Hi There"
,
"Hi There"
,
...
@@ -247,14 +254,16 @@ struct hmac_sha1_testvec {
...
@@ -247,14 +254,16 @@ struct hmac_sha1_testvec {
{
{
{
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
{
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa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ec {
...
@@ -280,7 +290,8 @@ struct hmac_sha1_testvec {
{
{
{
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
{
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x00
},
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x0c
,
0x00
},
"Test With Truncation"
,
"Test With Truncation"
,
...
@@ -297,7 +308,8 @@ struct hmac_sha1_testvec {
...
@@ -297,7 +308,8 @@ struct hmac_sha1_testvec {
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0x00
},
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0x00
},
"Test Using Larger Than Block-Size Key - Hash Key First"
,
"Test Using Larger Than Block-Size Key - Hash Key First"
,
...
@@ -314,9 +326,11 @@ struct hmac_sha1_testvec {
...
@@ -314,9 +326,11 @@ struct hmac_sha1_testvec {
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0x00
},
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0xaa
,
0x00
},
"Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data"
,
"Test Using Larger Than Block-Size Key and Larger Than One "
"Block-Size Data"
,
{
0xe8
,
0xe9
,
0x9d
,
0x0f
,
0x45
,
0x23
,
0x7d
,
0x78
,
0x6d
,
0x6b
,
{
0xe8
,
0xe9
,
0x9d
,
0x0f
,
0x45
,
0x23
,
0x7d
,
0x78
,
0x6d
,
0x6b
,
0xba
,
0xa7
,
0x96
,
0x5c
,
0x78
,
0x08
,
0xbb
,
0xff
,
0x1a
,
0x91
}
0xba
,
0xa7
,
0x96
,
0x5c
,
0x78
,
0x08
,
0xbb
,
0xff
,
0x1a
,
0x91
}
...
...
include/linux/crypto.h
View file @
b4021a7a
...
@@ -166,6 +166,9 @@ struct crypto_tfm {
...
@@ -166,6 +166,9 @@ struct crypto_tfm {
* If that fails and the kernel supports dynamically loadable modules, it
* If that fails and the kernel supports dynamically loadable modules, it
* will then attempt to load a module of the same name or alias. A refcount
* will then attempt to load a module of the same name or alias. A refcount
* is grabbed on the algorithm which is then associated with the new transform.
* is grabbed on the algorithm which is then associated with the new transform.
*
* crypto_free_tfm() frees up the transform and any associated resources,
* then drops the refcount on the associated algorithm.
*/
*/
struct
crypto_tfm
*
crypto_alloc_tfm
(
char
*
alg_name
,
u32
tfm_flags
);
struct
crypto_tfm
*
crypto_alloc_tfm
(
char
*
alg_name
,
u32
tfm_flags
);
void
crypto_free_tfm
(
struct
crypto_tfm
*
tfm
);
void
crypto_free_tfm
(
struct
crypto_tfm
*
tfm
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment