Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cellframe-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
16
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
cellframe-sdk
Commits
b300b497
Commit
b300b497
authored
7 years ago
by
Dmitriy Gerasimov
Browse files
Options
Downloads
Patches
Plain Diff
[*] Delcarations
parent
f9b23057
No related branches found
No related tags found
1 merge request
!24
Support 3689
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
crypt/dap_enc_key.c
+21
-0
21 additions, 0 deletions
crypt/dap_enc_key.c
with
21 additions
and
0 deletions
crypt/dap_enc_key.c
+
21
−
0
View file @
b300b497
...
...
@@ -29,6 +29,7 @@
#define LOG_TAG "dap_enc_key"
struct
dap_enc_key_callbacks
{
const
char
*
name
,
dap_enc_callback_dataop_t
enc
;
dap_enc_callback_dataop_t
dec
;
dap_enc_callback_data_t
new_from_callback
;
...
...
@@ -36,6 +37,7 @@ struct dap_enc_key_callbacks{
dap_enc_callback_t
delete_callback
;
}
s_callbacks
[]
=
{
[
DAP_ENC_KEY_TYPE_AES
]
=
{
.
name
=
"AES"
.
enc
=
dap_enc_aes_encode
,
.
dec
=
dap_enc_aes_decode
,
.
new_generate_callback
=
dap_enc_aes_key_new_generate
,
...
...
@@ -49,6 +51,25 @@ struct dap_enc_key_callbacks{
*/
int
dap_enc_key_init
()
{
size_t
i
;
for
(
i
=
0
;
i
<
sizeof
(
s_callbacks
)
/
sizeof
(
s_callbacks
[
0
]);
i
++
){
switch
((
dap_enc_key_type_t
)
i
)
{
case
DAP_ENC_KEY_CODE_MCBITS
:
case
DAP_ENC_KEY_LWE_FRODO
:
case
DAP_ENC_KEY_MLWE_KYBER
:
case
DAP_ENC_KEY_NTRU
:
case
DAP_ENC_KEY_RLWE_BCNS15
:
case
DAP_ENC_KEY_RLWE_MSRLN16
:
case
DAP_ENC_KEY_RLWE_NEWHOPE
:
case
DAP_ENC_KEY_SIDH_CLN16
:
case
DAP_ENC_KEY_SIDH_IQC_REF
:
case
DAP_ENC_KEY_SIG_PICNIC
:
case
DAP_ENC_KEY_TYPE_AES
:
continue
;
default:
memset
(
&
s_callbacks
[
i
],
0
,
sizeof
(
s_callbacks
[
0
]));
}
}
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment