Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
647d0ae3
Commit
647d0ae3
authored
Jan 24, 2002
by
Niels Möller
Browse files
(Public-key algorithms): Minor fixes.
Rev: src/nettle/nettle.texinfo:1.12
parent
3b1000d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/nettle/nettle.texinfo
View file @
647d0ae3
...
...
@@ -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
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 =
f
(x)
}
. Two examples are cryptographic hash functions, and
@code
{
y =
F
(x)
}
. Two examples are cryptographic hash functions, and
exponentiation in certain groups.
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
1983. The patent expired on September 20, 2000, and since that day,
@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
@example
...
...
@@ -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
@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
bits or larger.
...
...
@@ -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
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
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
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
...
...
@@ -1440,7 +1440,7 @@ Calls @code{mpz_clear} on all numbers in the key struct.
In general, Nettle's @acronym
{
rsa
}
functions deviates from Nettle's "no
memory allocation"-policy. Space for all the numbers, both in the key structs
above, and temporaries, are allocated dynamically. For informationon how
above, and temporaries, are allocated dynamically. For information
on how
to customize allocation, see @xref
{
Custom Allocation,,GMP Allocation,gmp
}
.
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
}
)
@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,
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
than the minimum size specified by PKCS#1.
@end deftypefun
...
...
@@ -1474,7 +1474,7 @@ the hash context is reset so that it can be used for new messages.
@end deftypefun
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
@acronym
{
CRT
}
optimization.
...
...
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