Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-chain-crypto
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
cellframe
libdap-chain-crypto
Commits
cf20479c
Commit
cf20479c
authored
5 years ago
by
Dmitriy A. Gerasimov
Browse files
Options
Downloads
Patches
Plain Diff
[+] Some missed cases and defaults
parent
79c08855
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dap_chain_pkey.c
+3
-0
3 additions, 0 deletions
dap_chain_pkey.c
dap_chain_sign.c
+4
-2
4 additions, 2 deletions
dap_chain_sign.c
with
7 additions
and
2 deletions
dap_chain_pkey.c
+
3
−
0
View file @
cf20479c
...
@@ -99,6 +99,9 @@ dap_chain_sign_type_t dap_chain_pkey_type_from_sign( dap_chain_pkey_type_t a_pke
...
@@ -99,6 +99,9 @@ dap_chain_sign_type_t dap_chain_pkey_type_from_sign( dap_chain_pkey_type_t a_pke
case
PKEY_TYPE_SIGN_BLISS
:
l_sign_type
.
type
=
SIG_TYPE_BLISS
;
break
;
case
PKEY_TYPE_SIGN_BLISS
:
l_sign_type
.
type
=
SIG_TYPE_BLISS
;
break
;
case
PKEY_TYPE_SIGN_PICNIC
:
l_sign_type
.
type
=
SIG_TYPE_PICNIC
;
break
;
case
PKEY_TYPE_SIGN_PICNIC
:
l_sign_type
.
type
=
SIG_TYPE_PICNIC
;
break
;
case
PKEY_TYPE_SIGN_TESLA
:
l_sign_type
.
type
=
SIG_TYPE_TESLA
;
break
;
case
PKEY_TYPE_SIGN_TESLA
:
l_sign_type
.
type
=
SIG_TYPE_TESLA
;
break
;
case
PKEY_TYPE_SIGN_DILITHIUM
:
l_sign_type
.
type
=
SIG_TYPE_DILITHIUM
;
break
;
case
PKEY_TYPE_MULTI
:
l_sign_type
.
type
=
SIG_TYPE_MULTI
;
break
;
case
PKEY_TYPE_NULL
:
l_sign_type
.
type
=
SIG_TYPE_NULL
;
break
;
}
}
return
l_sign_type
;
return
l_sign_type
;
}
}
...
...
This diff is collapsed.
Click to expand it.
dap_chain_sign.c
+
4
−
2
View file @
cf20479c
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include
"dap_enc_bliss.h"
#include
"dap_enc_bliss.h"
#include
"dap_enc_tesla.h"
#include
"dap_enc_tesla.h"
#include
"dap_enc_picnic.h"
#include
"dap_enc_picnic.h"
#include
"dap_enc_dilithium.h"
#define LOG_TAG "dap_chain_sign"
#define LOG_TAG "dap_chain_sign"
...
@@ -58,12 +59,13 @@ size_t dap_chain_sign_create_output_cals_size(dap_enc_key_t * a_key, size_t a_ou
...
@@ -58,12 +59,13 @@ size_t dap_chain_sign_create_output_cals_size(dap_enc_key_t * a_key, size_t a_ou
*/
*/
dap_chain_sign_type_t
dap_chain_sign_type_from_key_type
(
dap_enc_key_type_t
a_key_type
)
dap_chain_sign_type_t
dap_chain_sign_type_from_key_type
(
dap_enc_key_type_t
a_key_type
)
{
{
dap_chain_sign_type_t
l_sign_type
=
{
0
}
;
dap_chain_sign_type_t
l_sign_type
;
switch
(
a_key_type
){
switch
(
a_key_type
){
case
DAP_ENC_KEY_TYPE_SIG_BLISS
:
l_sign_type
.
type
=
SIG_TYPE_BLISS
;
break
;
case
DAP_ENC_KEY_TYPE_SIG_BLISS
:
l_sign_type
.
type
=
SIG_TYPE_BLISS
;
break
;
case
DAP_ENC_KEY_TYPE_SIG_PICNIC
:
l_sign_type
.
type
=
SIG_TYPE_PICNIC
;
break
;
case
DAP_ENC_KEY_TYPE_SIG_PICNIC
:
l_sign_type
.
type
=
SIG_TYPE_PICNIC
;
break
;
case
DAP_ENC_KEY_TYPE_SIG_TESLA
:
l_sign_type
.
type
=
SIG_TYPE_TESLA
;
break
;
case
DAP_ENC_KEY_TYPE_SIG_TESLA
:
l_sign_type
.
type
=
SIG_TYPE_TESLA
;
break
;
case
DAP_ENC_KEY_TYPE_SIG_DILITHIUM
:
l_sign_type
.
type
=
SIG_TYPE_DILITHIUM
;
break
;
case
DAP_ENC_KEY_TYPE_SIG_DILITHIUM
:
l_sign_type
.
type
=
SIG_TYPE_DILITHIUM
;
break
;
default:
l_sign_type
.
raw
=
0
;
}
}
return
l_sign_type
;
return
l_sign_type
;
}
}
...
@@ -98,7 +100,7 @@ const char * dap_chain_sign_type_to_str(dap_chain_sign_type_t a_chain_sign_type)
...
@@ -98,7 +100,7 @@ const char * dap_chain_sign_type_to_str(dap_chain_sign_type_t a_chain_sign_type)
case
SIG_TYPE_TESLA
:
return
"sig_tesla"
;
case
SIG_TYPE_TESLA
:
return
"sig_tesla"
;
case
SIG_TYPE_PICNIC
:
return
"sig_picnic"
;
case
SIG_TYPE_PICNIC
:
return
"sig_picnic"
;
case
SIG_TYPE_DILITHIUM
:
return
"sig_dil"
;
case
SIG_TYPE_DILITHIUM
:
return
"sig_dil"
;
default:
return
SIG_TYPE_NULL
;
//DAP_ENC_KEY_TYPE_NULL;
default:
return
"UNDEFINED"
;
//DAP_ENC_KEY_TYPE_NULL;
}
}
}
}
...
...
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