Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Nettle
nettle
Commits
42721f77
Commit
42721f77
authored
Jan 27, 2003
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(dsa_signature_from_sexp): New function.
Rev: src/nettle/dsa.h:1.6 Rev: src/nettle/sexp2dsa.c:1.3
parent
d41a05cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
dsa.h
dsa.h
+4
-0
sexp2dsa.c
sexp2dsa.c
+16
-0
No files found.
dsa.h
View file @
42721f77
...
...
@@ -153,6 +153,10 @@ dsa_generate_keypair(struct dsa_public_key *pub,
struct
sexp_iterator
;
int
dsa_signature_from_sexp
(
struct
dsa_signature
*
rs
,
struct
sexp_iterator
*
i
);
int
dsa_keypair_from_sexp_alist
(
struct
dsa_public_key
*
pub
,
struct
dsa_private_key
*
priv
,
...
...
sexp2dsa.c
View file @
42721f77
...
...
@@ -87,4 +87,20 @@ dsa_keypair_from_sexp(struct dsa_public_key *pub,
&&
dsa_keypair_from_sexp_alist
(
pub
,
priv
,
limit
,
&
i
);
}
int
dsa_signature_from_sexp
(
struct
dsa_signature
*
rs
,
struct
sexp_iterator
*
i
)
{
static
const
uint8_t
*
names
[
2
]
=
{
"r"
,
"s"
};
struct
sexp_iterator
values
[
2
];
if
(
!
sexp_iterator_assoc
(
i
,
2
,
names
,
values
))
return
0
;
GET
(
rs
->
r
,
160
,
&
values
[
0
]);
GET
(
rs
->
s
,
160
,
&
values
[
1
]);
return
1
;
}
#endif
/* WITH_PUBLIC_KEY */
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