Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Dmitry Baryshkov
nettle
Commits
af9bf6c8
Commit
af9bf6c8
authored
23 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
(Public-key algorithms): Minor fixes.
Rev: src/nettle/nettle.texinfo:1.12
parent
617db8ef
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
nettle.texinfo
+7
-7
7 additions, 7 deletions
nettle.texinfo
with
7 additions
and
7 deletions
nettle.texinfo
+
7
−
7
View file @
af9bf6c8
...
@@ -1282,7 +1282,7 @@ Public-key cryptography uses trapdoor one-way functions. A
...
@@ -1282,7 +1282,7 @@ Public-key cryptography uses trapdoor one-way functions. A
@dfn
{
one-way function
}
is a function @code
{
F
}
such that it is easy to
@dfn
{
one-way function
}
is a function @code
{
F
}
such that it is easy to
compute the value @code
{
F(x)
}
for any @code
{
x
}
, but given a value
compute the value @code
{
F(x)
}
for any @code
{
x
}
, but given a value
@code
{
y
}
, it is hard to compute a corresponding @code
{
x
}
such that
@code
{
y
}
, it is hard to compute a corresponding @code
{
x
}
such that
@code
{
y =
f
(x)
}
. Two examples are cryptographic hash functions, and
@code
{
y =
F
(x)
}
. Two examples are cryptographic hash functions, and
exponentiation in certain groups.
exponentiation in certain groups.
A @dfn
{
trapdoor one-way function
}
is a function @code
{
F
}
that is
A @dfn
{
trapdoor one-way function
}
is a function @code
{
F
}
that is
...
@@ -1340,7 +1340,7 @@ Adi Shamir and L.M. Adleman, and the technique was also patented in
...
@@ -1340,7 +1340,7 @@ Adi Shamir and L.M. Adleman, and the technique was also patented in
1983. The patent expired on September 20, 2000, and since that day,
1983. The patent expired on September 20, 2000, and since that day,
@acronym
{
RSA
}
can be used freely.
@acronym
{
RSA
}
can be used freely.
It's remarkably simple to describe trapdoor function behind
It's remarkably simple to describe
the
trapdoor function behind
@acronym
{
RSA
}
. The "one-way"-function used is
@acronym
{
RSA
}
. The "one-way"-function used is
@example
@example
...
@@ -1349,7 +1349,7 @@ F(x) = x^e mod n
...
@@ -1349,7 +1349,7 @@ F(x) = x^e mod n
I.e. raise x to the @code
{
e
}
:th power, while discarding all multiples of
I.e. raise x to the @code
{
e
}
:th power, while discarding all multiples of
@code
{
n
}
. The pair of numbers @code
{
n
}
and @code
{
e
}
is the public key.
@code
{
n
}
. The pair of numbers @code
{
n
}
and @code
{
e
}
is the public key.
@code
{
e
}
can be quite small, even @code
{
e = 3
}
ha
ve
been used, although
@code
{
e
}
can be quite small, even @code
{
e = 3
}
ha
s
been used, although
slightly larger numbers are recommended. @code
{
n
}
should be about 1000
slightly larger numbers are recommended. @code
{
n
}
should be about 1000
bits or larger.
bits or larger.
...
@@ -1393,7 +1393,7 @@ signed is first hashed using a cryptographic hash function, e.g.
...
@@ -1393,7 +1393,7 @@ signed is first hashed using a cryptographic hash function, e.g.
"Algorithm Identifier" for the hash function, and the message digest
"Algorithm Identifier" for the hash function, and the message digest
itself, are concatenated and converted to a number @code
{
x
}
. The
itself, are concatenated and converted to a number @code
{
x
}
. The
signature is computed from @code
{
x
}
and the private key as @code
{
s = x
^
d
signature is computed from @code
{
x
}
and the private key as @code
{
s = x
^
d
mod n
}
@footnote
{
Actu
e
lly, the computation is not done like this, it is
mod n
}
@footnote
{
Actu
a
lly, the computation is not done like this, it is
done more efficiently using @code
{
p
}
, @code
{
q
}
and the chinese remainder
done more efficiently using @code
{
p
}
, @code
{
q
}
and the chinese remainder
theorem (@acronym
{
CRT
}
). But the result is the same.
}
. The signature, @code
{
s
}
is a
theorem (@acronym
{
CRT
}
). But the result is the same.
}
. The signature, @code
{
s
}
is a
number of about the same size of @code
{
n
}
, and it usually encoded as a
number of about the same size of @code
{
n
}
, and it usually encoded as a
...
@@ -1448,7 +1448,7 @@ When you have assigned values to the attributes of a key, you must call
...
@@ -1448,7 +1448,7 @@ When you have assigned values to the attributes of a key, you must call
@deftypefun int rsa
_
prepare
_
public
_
key (struct rsa
_
public
_
key *@var
{
pub
}
)
@deftypefun int rsa
_
prepare
_
public
_
key (struct rsa
_
public
_
key *@var
{
pub
}
)
@deftypefunx int rsa
_
prepare
_
private
_
key (struct rsa
_
private
_
key *@var
{
key
}
)
@deftypefunx int rsa
_
prepare
_
private
_
key (struct rsa
_
private
_
key *@var
{
key
}
)
Computes the octet size of the key (stored in the @code
{
size
}
attribute,
Computes the octet size of the key (stored in the @code
{
size
}
attribute,
and may also do other basi
g
sanity checks. Returns one if successful, or
and may also do other basi
c
sanity checks. Returns one if successful, or
zero if the key can't be used, for instance if the modulo is smaller
zero if the key can't be used, for instance if the modulo is smaller
than the minimum size specified by PKCS#1.
than the minimum size specified by PKCS#1.
@end deftypefun
@end deftypefun
...
@@ -1474,7 +1474,7 @@ the hash context is reset so that it can be used for new messages.
...
@@ -1474,7 +1474,7 @@ the hash context is reset so that it can be used for new messages.
@end deftypefun
@end deftypefun
If you need to use the @acronym
{
RSA
}
trapdoor, the private key, in a way
If you need to use the @acronym
{
RSA
}
trapdoor, the private key, in a way
that isn't support by the above functions Nettle also includes a
that isn't support
ed
by the above functions Nettle also includes a
function that computes @code
{
x
^
d mod n
}
and nothing more, using the
function that computes @code
{
x
^
d mod n
}
and nothing more, using the
@acronym
{
CRT
}
optimization.
@acronym
{
CRT
}
optimization.
...
...
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