Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 12 additions & 21 deletions doc/crypt.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5747,24 +5747,19 @@ \subsection{X25519 Key Operations}
\end{verbatim}

To generate a fresh X25529 key, one can use \textit{x25519\_make\_key} which will create a private\&public key-pair.

\index{x25519\_set\_key}
\index{x25519\_import}
\begin{verbatim}
int x25519_set_key(const unsigned char *k, unsigned long klen,
const unsigned char *u, unsigned long ulen,
curve25519_key *key);
int x25519_import(const unsigned char *in, unsigned long inlen, curve25519_key *key);
\end{verbatim}

To import a public or private key in raw format, one can use the function \textit{x25519\_set\_key}.
In case both, the secret part \textit{k} and the public part \textit{u} are given, the operation validates that the given
public part fits to the secret part.
The \textit{x25519\_import} function can be used to import a public key in DER-encoded \textit{SubjectPublicKeyInfo} format.

\index{x25519\_import}
\index{x25519\_import\_raw}
\begin{verbatim}
int x25519_import(const unsigned char *in, unsigned long inlen, curve25519_key *key);
int x25519_import_raw(const unsigned char *in, unsigned long inlen, int which, curve25519_key *key);
\end{verbatim}

The \textit{x25519\_import} function can be used to import a public key in DER-encoded \textit{SubjectPublicKeyInfo} format.
To import a public or private key in raw format, one can use the function \textit{x25519\_import\_raw}.

\index{x25519\_import\_x509}
\begin{verbatim}
Expand Down Expand Up @@ -5836,23 +5831,19 @@ \subsection{EdDSA Key Operations}

To generate a fresh Ed25529 key, one can use \textit{ed25519\_make\_key} which will create a private\&public key-pair.

\index{ed25519\_set\_key}
\index{ed25519\_import}
\begin{verbatim}
int ed25519_set_key(const unsigned char *sk, unsigned long sklen,
const unsigned char *pk, unsigned long pklen,
curve25519_key *key);
int ed25519_import(const unsigned char *in, unsigned long inlen, curve25519_key *key);
\end{verbatim}

To import a public or private key in raw format, one can use the function \textit{ed25519\_set\_key}.
In case both, the secret part \textit{sk} and the public part \textit{pk} are given, the operation validates that the given
public part fits to the secret part.
The \textit{ed25519\_import} function can be used to import a public key in DER-encoded \textit{SubjectPublicKeyInfo} format.

\index{ed25519\_import}
\index{ed25519\_import\_raw}
\begin{verbatim}
int ed25519_import(const unsigned char *in, unsigned long inlen, curve25519_key *key);
int ed25519_import_raw(const unsigned char *in, unsigned long inlen, int which, curve25519_key *key);
\end{verbatim}

The \textit{ed25519\_import} function can be used to import a public key in DER-encoded \textit{SubjectPublicKeyInfo} format.
To import a public or private key in raw format, one can use the function \textit{ed25519\_import\_raw}.

\index{ed25519\_import\_x509}
\begin{verbatim}
Expand Down
12 changes: 6 additions & 6 deletions libtomcrypt_VS2008.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -2511,15 +2511,15 @@
>
</File>
<File
RelativePath="src\pk\ed25519\ed25519_import_x509.c"
RelativePath="src\pk\ed25519\ed25519_import_raw.c"
>
</File>
<File
RelativePath="src\pk\ed25519\ed25519_make_key.c"
RelativePath="src\pk\ed25519\ed25519_import_x509.c"
>
</File>
<File
RelativePath="src\pk\ed25519\ed25519_set_key.c"
RelativePath="src\pk\ed25519\ed25519_make_key.c"
>
</File>
<File
Expand Down Expand Up @@ -2647,15 +2647,15 @@
>
</File>
<File
RelativePath="src\pk\x25519\x25519_import_x509.c"
RelativePath="src\pk\x25519\x25519_import_raw.c"
>
</File>
<File
RelativePath="src\pk\x25519\x25519_make_key.c"
RelativePath="src\pk\x25519\x25519_import_x509.c"
>
</File>
<File
RelativePath="src\pk\x25519\x25519_set_key.c"
RelativePath="src\pk\x25519\x25519_make_key.c"
>
</File>
<File
Expand Down
38 changes: 19 additions & 19 deletions makefile.mingw
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ src/pk/ecc/ltc_ecc_is_point_at_infinity.o src/pk/ecc/ltc_ecc_map.o src/pk/ecc/lt
src/pk/ecc/ltc_ecc_mulmod.o src/pk/ecc/ltc_ecc_mulmod_timing.o src/pk/ecc/ltc_ecc_points.o \
src/pk/ecc/ltc_ecc_projective_add_point.o src/pk/ecc/ltc_ecc_projective_dbl_point.o \
src/pk/ecc/ltc_ecc_verify_key.o src/pk/ed25519/ed25519_export.o src/pk/ed25519/ed25519_import.o \
src/pk/ed25519/ed25519_import_pkcs8.o src/pk/ed25519/ed25519_import_x509.o \
src/pk/ed25519/ed25519_make_key.o src/pk/ed25519/ed25519_set_key.o src/pk/ed25519/ed25519_sign.o \
src/pk/ed25519/ed25519_import_pkcs8.o src/pk/ed25519/ed25519_import_raw.o \
src/pk/ed25519/ed25519_import_x509.o src/pk/ed25519/ed25519_make_key.o src/pk/ed25519/ed25519_sign.o \
src/pk/ed25519/ed25519_verify.o src/pk/pkcs1/pkcs_1_i2osp.o src/pk/pkcs1/pkcs_1_mgf1.o \
src/pk/pkcs1/pkcs_1_oaep_decode.o src/pk/pkcs1/pkcs_1_oaep_encode.o src/pk/pkcs1/pkcs_1_os2ip.o \
src/pk/pkcs1/pkcs_1_pss_decode.o src/pk/pkcs1/pkcs_1_pss_encode.o src/pk/pkcs1/pkcs_1_v1_5_decode.o \
Expand All @@ -204,23 +204,23 @@ src/pk/rsa/rsa_export.o src/pk/rsa/rsa_exptmod.o src/pk/rsa/rsa_get_size.o src/p
src/pk/rsa/rsa_import_pkcs8.o src/pk/rsa/rsa_import_x509.o src/pk/rsa/rsa_key.o \
src/pk/rsa/rsa_make_key.o src/pk/rsa/rsa_set.o src/pk/rsa/rsa_sign_hash.o \
src/pk/rsa/rsa_sign_saltlen_get.o src/pk/rsa/rsa_verify_hash.o src/pk/x25519/x25519_export.o \
src/pk/x25519/x25519_import.o src/pk/x25519/x25519_import_pkcs8.o src/pk/x25519/x25519_import_x509.o \
src/pk/x25519/x25519_make_key.o src/pk/x25519/x25519_set_key.o src/pk/x25519/x25519_shared_secret.o \
src/prngs/chacha20.o src/prngs/fortuna.o src/prngs/rc4.o src/prngs/rng_get_bytes.o \
src/prngs/rng_make_prng.o src/prngs/sober128.o src/prngs/sprng.o src/prngs/yarrow.o \
src/stream/chacha/chacha_crypt.o src/stream/chacha/chacha_done.o src/stream/chacha/chacha_ivctr32.o \
src/stream/chacha/chacha_ivctr64.o src/stream/chacha/chacha_keystream.o \
src/stream/chacha/chacha_memory.o src/stream/chacha/chacha_setup.o src/stream/chacha/chacha_test.o \
src/stream/rabbit/rabbit.o src/stream/rabbit/rabbit_memory.o src/stream/rc4/rc4_stream.o \
src/stream/rc4/rc4_stream_memory.o src/stream/rc4/rc4_test.o src/stream/salsa20/salsa20_crypt.o \
src/stream/salsa20/salsa20_done.o src/stream/salsa20/salsa20_ivctr64.o \
src/stream/salsa20/salsa20_keystream.o src/stream/salsa20/salsa20_memory.o \
src/stream/salsa20/salsa20_setup.o src/stream/salsa20/salsa20_test.o \
src/stream/salsa20/xsalsa20_memory.o src/stream/salsa20/xsalsa20_setup.o \
src/stream/salsa20/xsalsa20_test.o src/stream/sober128/sober128_stream.o \
src/stream/sober128/sober128_stream_memory.o src/stream/sober128/sober128_test.o \
src/stream/sosemanuk/sosemanuk.o src/stream/sosemanuk/sosemanuk_memory.o \
src/stream/sosemanuk/sosemanuk_test.o
src/pk/x25519/x25519_import.o src/pk/x25519/x25519_import_pkcs8.o src/pk/x25519/x25519_import_raw.o \
src/pk/x25519/x25519_import_x509.o src/pk/x25519/x25519_make_key.o \
src/pk/x25519/x25519_shared_secret.o src/prngs/chacha20.o src/prngs/fortuna.o src/prngs/rc4.o \
src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o src/prngs/sober128.o src/prngs/sprng.o \
src/prngs/yarrow.o src/stream/chacha/chacha_crypt.o src/stream/chacha/chacha_done.o \
src/stream/chacha/chacha_ivctr32.o src/stream/chacha/chacha_ivctr64.o \
src/stream/chacha/chacha_keystream.o src/stream/chacha/chacha_memory.o \
src/stream/chacha/chacha_setup.o src/stream/chacha/chacha_test.o src/stream/rabbit/rabbit.o \
src/stream/rabbit/rabbit_memory.o src/stream/rc4/rc4_stream.o src/stream/rc4/rc4_stream_memory.o \
src/stream/rc4/rc4_test.o src/stream/salsa20/salsa20_crypt.o src/stream/salsa20/salsa20_done.o \
src/stream/salsa20/salsa20_ivctr64.o src/stream/salsa20/salsa20_keystream.o \
src/stream/salsa20/salsa20_memory.o src/stream/salsa20/salsa20_setup.o \
src/stream/salsa20/salsa20_test.o src/stream/salsa20/xsalsa20_memory.o \
src/stream/salsa20/xsalsa20_setup.o src/stream/salsa20/xsalsa20_test.o \
src/stream/sober128/sober128_stream.o src/stream/sober128/sober128_stream_memory.o \
src/stream/sober128/sober128_test.o src/stream/sosemanuk/sosemanuk.o \
src/stream/sosemanuk/sosemanuk_memory.o src/stream/sosemanuk/sosemanuk_test.o

#List of test objects to compile
TOBJECTS=tests/base16_test.o tests/base32_test.o tests/base64_test.o tests/bcrypt_test.o \
Expand Down
38 changes: 19 additions & 19 deletions makefile.msvc
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ src/pk/ecc/ltc_ecc_is_point_at_infinity.obj src/pk/ecc/ltc_ecc_map.obj src/pk/ec
src/pk/ecc/ltc_ecc_mulmod.obj src/pk/ecc/ltc_ecc_mulmod_timing.obj src/pk/ecc/ltc_ecc_points.obj \
src/pk/ecc/ltc_ecc_projective_add_point.obj src/pk/ecc/ltc_ecc_projective_dbl_point.obj \
src/pk/ecc/ltc_ecc_verify_key.obj src/pk/ed25519/ed25519_export.obj src/pk/ed25519/ed25519_import.obj \
src/pk/ed25519/ed25519_import_pkcs8.obj src/pk/ed25519/ed25519_import_x509.obj \
src/pk/ed25519/ed25519_make_key.obj src/pk/ed25519/ed25519_set_key.obj src/pk/ed25519/ed25519_sign.obj \
src/pk/ed25519/ed25519_import_pkcs8.obj src/pk/ed25519/ed25519_import_raw.obj \
src/pk/ed25519/ed25519_import_x509.obj src/pk/ed25519/ed25519_make_key.obj src/pk/ed25519/ed25519_sign.obj \
src/pk/ed25519/ed25519_verify.obj src/pk/pkcs1/pkcs_1_i2osp.obj src/pk/pkcs1/pkcs_1_mgf1.obj \
src/pk/pkcs1/pkcs_1_oaep_decode.obj src/pk/pkcs1/pkcs_1_oaep_encode.obj src/pk/pkcs1/pkcs_1_os2ip.obj \
src/pk/pkcs1/pkcs_1_pss_decode.obj src/pk/pkcs1/pkcs_1_pss_encode.obj src/pk/pkcs1/pkcs_1_v1_5_decode.obj \
Expand All @@ -197,23 +197,23 @@ src/pk/rsa/rsa_export.obj src/pk/rsa/rsa_exptmod.obj src/pk/rsa/rsa_get_size.obj
src/pk/rsa/rsa_import_pkcs8.obj src/pk/rsa/rsa_import_x509.obj src/pk/rsa/rsa_key.obj \
src/pk/rsa/rsa_make_key.obj src/pk/rsa/rsa_set.obj src/pk/rsa/rsa_sign_hash.obj \
src/pk/rsa/rsa_sign_saltlen_get.obj src/pk/rsa/rsa_verify_hash.obj src/pk/x25519/x25519_export.obj \
src/pk/x25519/x25519_import.obj src/pk/x25519/x25519_import_pkcs8.obj src/pk/x25519/x25519_import_x509.obj \
src/pk/x25519/x25519_make_key.obj src/pk/x25519/x25519_set_key.obj src/pk/x25519/x25519_shared_secret.obj \
src/prngs/chacha20.obj src/prngs/fortuna.obj src/prngs/rc4.obj src/prngs/rng_get_bytes.obj \
src/prngs/rng_make_prng.obj src/prngs/sober128.obj src/prngs/sprng.obj src/prngs/yarrow.obj \
src/stream/chacha/chacha_crypt.obj src/stream/chacha/chacha_done.obj src/stream/chacha/chacha_ivctr32.obj \
src/stream/chacha/chacha_ivctr64.obj src/stream/chacha/chacha_keystream.obj \
src/stream/chacha/chacha_memory.obj src/stream/chacha/chacha_setup.obj src/stream/chacha/chacha_test.obj \
src/stream/rabbit/rabbit.obj src/stream/rabbit/rabbit_memory.obj src/stream/rc4/rc4_stream.obj \
src/stream/rc4/rc4_stream_memory.obj src/stream/rc4/rc4_test.obj src/stream/salsa20/salsa20_crypt.obj \
src/stream/salsa20/salsa20_done.obj src/stream/salsa20/salsa20_ivctr64.obj \
src/stream/salsa20/salsa20_keystream.obj src/stream/salsa20/salsa20_memory.obj \
src/stream/salsa20/salsa20_setup.obj src/stream/salsa20/salsa20_test.obj \
src/stream/salsa20/xsalsa20_memory.obj src/stream/salsa20/xsalsa20_setup.obj \
src/stream/salsa20/xsalsa20_test.obj src/stream/sober128/sober128_stream.obj \
src/stream/sober128/sober128_stream_memory.obj src/stream/sober128/sober128_test.obj \
src/stream/sosemanuk/sosemanuk.obj src/stream/sosemanuk/sosemanuk_memory.obj \
src/stream/sosemanuk/sosemanuk_test.obj
src/pk/x25519/x25519_import.obj src/pk/x25519/x25519_import_pkcs8.obj src/pk/x25519/x25519_import_raw.obj \
src/pk/x25519/x25519_import_x509.obj src/pk/x25519/x25519_make_key.obj \
src/pk/x25519/x25519_shared_secret.obj src/prngs/chacha20.obj src/prngs/fortuna.obj src/prngs/rc4.obj \
src/prngs/rng_get_bytes.obj src/prngs/rng_make_prng.obj src/prngs/sober128.obj src/prngs/sprng.obj \
src/prngs/yarrow.obj src/stream/chacha/chacha_crypt.obj src/stream/chacha/chacha_done.obj \
src/stream/chacha/chacha_ivctr32.obj src/stream/chacha/chacha_ivctr64.obj \
src/stream/chacha/chacha_keystream.obj src/stream/chacha/chacha_memory.obj \
src/stream/chacha/chacha_setup.obj src/stream/chacha/chacha_test.obj src/stream/rabbit/rabbit.obj \
src/stream/rabbit/rabbit_memory.obj src/stream/rc4/rc4_stream.obj src/stream/rc4/rc4_stream_memory.obj \
src/stream/rc4/rc4_test.obj src/stream/salsa20/salsa20_crypt.obj src/stream/salsa20/salsa20_done.obj \
src/stream/salsa20/salsa20_ivctr64.obj src/stream/salsa20/salsa20_keystream.obj \
src/stream/salsa20/salsa20_memory.obj src/stream/salsa20/salsa20_setup.obj \
src/stream/salsa20/salsa20_test.obj src/stream/salsa20/xsalsa20_memory.obj \
src/stream/salsa20/xsalsa20_setup.obj src/stream/salsa20/xsalsa20_test.obj \
src/stream/sober128/sober128_stream.obj src/stream/sober128/sober128_stream_memory.obj \
src/stream/sober128/sober128_test.obj src/stream/sosemanuk/sosemanuk.obj \
src/stream/sosemanuk/sosemanuk_memory.obj src/stream/sosemanuk/sosemanuk_test.obj

#List of test objects to compile
TOBJECTS=tests/base16_test.obj tests/base32_test.obj tests/base64_test.obj tests/bcrypt_test.obj \
Expand Down
38 changes: 19 additions & 19 deletions makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ src/pk/ecc/ltc_ecc_is_point_at_infinity.o src/pk/ecc/ltc_ecc_map.o src/pk/ecc/lt
src/pk/ecc/ltc_ecc_mulmod.o src/pk/ecc/ltc_ecc_mulmod_timing.o src/pk/ecc/ltc_ecc_points.o \
src/pk/ecc/ltc_ecc_projective_add_point.o src/pk/ecc/ltc_ecc_projective_dbl_point.o \
src/pk/ecc/ltc_ecc_verify_key.o src/pk/ed25519/ed25519_export.o src/pk/ed25519/ed25519_import.o \
src/pk/ed25519/ed25519_import_pkcs8.o src/pk/ed25519/ed25519_import_x509.o \
src/pk/ed25519/ed25519_make_key.o src/pk/ed25519/ed25519_set_key.o src/pk/ed25519/ed25519_sign.o \
src/pk/ed25519/ed25519_import_pkcs8.o src/pk/ed25519/ed25519_import_raw.o \
src/pk/ed25519/ed25519_import_x509.o src/pk/ed25519/ed25519_make_key.o src/pk/ed25519/ed25519_sign.o \
src/pk/ed25519/ed25519_verify.o src/pk/pkcs1/pkcs_1_i2osp.o src/pk/pkcs1/pkcs_1_mgf1.o \
src/pk/pkcs1/pkcs_1_oaep_decode.o src/pk/pkcs1/pkcs_1_oaep_encode.o src/pk/pkcs1/pkcs_1_os2ip.o \
src/pk/pkcs1/pkcs_1_pss_decode.o src/pk/pkcs1/pkcs_1_pss_encode.o src/pk/pkcs1/pkcs_1_v1_5_decode.o \
Expand All @@ -214,23 +214,23 @@ src/pk/rsa/rsa_export.o src/pk/rsa/rsa_exptmod.o src/pk/rsa/rsa_get_size.o src/p
src/pk/rsa/rsa_import_pkcs8.o src/pk/rsa/rsa_import_x509.o src/pk/rsa/rsa_key.o \
src/pk/rsa/rsa_make_key.o src/pk/rsa/rsa_set.o src/pk/rsa/rsa_sign_hash.o \
src/pk/rsa/rsa_sign_saltlen_get.o src/pk/rsa/rsa_verify_hash.o src/pk/x25519/x25519_export.o \
src/pk/x25519/x25519_import.o src/pk/x25519/x25519_import_pkcs8.o src/pk/x25519/x25519_import_x509.o \
src/pk/x25519/x25519_make_key.o src/pk/x25519/x25519_set_key.o src/pk/x25519/x25519_shared_secret.o \
src/prngs/chacha20.o src/prngs/fortuna.o src/prngs/rc4.o src/prngs/rng_get_bytes.o \
src/prngs/rng_make_prng.o src/prngs/sober128.o src/prngs/sprng.o src/prngs/yarrow.o \
src/stream/chacha/chacha_crypt.o src/stream/chacha/chacha_done.o src/stream/chacha/chacha_ivctr32.o \
src/stream/chacha/chacha_ivctr64.o src/stream/chacha/chacha_keystream.o \
src/stream/chacha/chacha_memory.o src/stream/chacha/chacha_setup.o src/stream/chacha/chacha_test.o \
src/stream/rabbit/rabbit.o src/stream/rabbit/rabbit_memory.o src/stream/rc4/rc4_stream.o \
src/stream/rc4/rc4_stream_memory.o src/stream/rc4/rc4_test.o src/stream/salsa20/salsa20_crypt.o \
src/stream/salsa20/salsa20_done.o src/stream/salsa20/salsa20_ivctr64.o \
src/stream/salsa20/salsa20_keystream.o src/stream/salsa20/salsa20_memory.o \
src/stream/salsa20/salsa20_setup.o src/stream/salsa20/salsa20_test.o \
src/stream/salsa20/xsalsa20_memory.o src/stream/salsa20/xsalsa20_setup.o \
src/stream/salsa20/xsalsa20_test.o src/stream/sober128/sober128_stream.o \
src/stream/sober128/sober128_stream_memory.o src/stream/sober128/sober128_test.o \
src/stream/sosemanuk/sosemanuk.o src/stream/sosemanuk/sosemanuk_memory.o \
src/stream/sosemanuk/sosemanuk_test.o
src/pk/x25519/x25519_import.o src/pk/x25519/x25519_import_pkcs8.o src/pk/x25519/x25519_import_raw.o \
src/pk/x25519/x25519_import_x509.o src/pk/x25519/x25519_make_key.o \
src/pk/x25519/x25519_shared_secret.o src/prngs/chacha20.o src/prngs/fortuna.o src/prngs/rc4.o \
src/prngs/rng_get_bytes.o src/prngs/rng_make_prng.o src/prngs/sober128.o src/prngs/sprng.o \
src/prngs/yarrow.o src/stream/chacha/chacha_crypt.o src/stream/chacha/chacha_done.o \
src/stream/chacha/chacha_ivctr32.o src/stream/chacha/chacha_ivctr64.o \
src/stream/chacha/chacha_keystream.o src/stream/chacha/chacha_memory.o \
src/stream/chacha/chacha_setup.o src/stream/chacha/chacha_test.o src/stream/rabbit/rabbit.o \
src/stream/rabbit/rabbit_memory.o src/stream/rc4/rc4_stream.o src/stream/rc4/rc4_stream_memory.o \
src/stream/rc4/rc4_test.o src/stream/salsa20/salsa20_crypt.o src/stream/salsa20/salsa20_done.o \
src/stream/salsa20/salsa20_ivctr64.o src/stream/salsa20/salsa20_keystream.o \
src/stream/salsa20/salsa20_memory.o src/stream/salsa20/salsa20_setup.o \
src/stream/salsa20/salsa20_test.o src/stream/salsa20/xsalsa20_memory.o \
src/stream/salsa20/xsalsa20_setup.o src/stream/salsa20/xsalsa20_test.o \
src/stream/sober128/sober128_stream.o src/stream/sober128/sober128_stream_memory.o \
src/stream/sober128/sober128_test.o src/stream/sosemanuk/sosemanuk.o \
src/stream/sosemanuk/sosemanuk_memory.o src/stream/sosemanuk/sosemanuk_test.o

#List of test objects to compile (all goes to libtomcrypt_prof.a)
TOBJECTS=tests/base16_test.o tests/base32_test.o tests/base64_test.o tests/bcrypt_test.o \
Expand Down
Loading