summaryrefslogtreecommitdiff
path: root/src/ltc/pk/x25519
diff options
context:
space:
mode:
Diffstat (limited to 'src/ltc/pk/x25519')
-rw-r--r--src/ltc/pk/x25519/x25519_export.c2
-rw-r--r--src/ltc/pk/x25519/x25519_import.c4
-rw-r--r--src/ltc/pk/x25519/x25519_import_pkcs8.c2
-rw-r--r--src/ltc/pk/x25519/x25519_import_raw.c2
-rw-r--r--src/ltc/pk/x25519/x25519_import_x509.c4
-rw-r--r--src/ltc/pk/x25519/x25519_make_key.c2
6 files changed, 8 insertions, 8 deletions
diff --git a/src/ltc/pk/x25519/x25519_export.c b/src/ltc/pk/x25519/x25519_export.c
index c828512b..0687c135 100644
--- a/src/ltc/pk/x25519/x25519_export.c
+++ b/src/ltc/pk/x25519/x25519_export.c
@@ -23,7 +23,7 @@ int x25519_export( unsigned char *out, unsigned long *outlen,
{
LTC_ARGCHK(key != NULL);
- if (key->algo != PKA_X25519) return CRYPT_PK_INVALID_TYPE;
+ if (key->algo != LTC_OID_X25519) return CRYPT_PK_INVALID_TYPE;
return ec25519_export(out, outlen, which, key);
}
diff --git a/src/ltc/pk/x25519/x25519_import.c b/src/ltc/pk/x25519/x25519_import.c
index ddbbd54b..247885f9 100644
--- a/src/ltc/pk/x25519/x25519_import.c
+++ b/src/ltc/pk/x25519/x25519_import.c
@@ -25,9 +25,9 @@ int x25519_import(const unsigned char *in, unsigned long inlen, curve25519_key *
LTC_ARGCHK(key != NULL);
key_len = sizeof(key->pub);
- if ((err = x509_decode_subject_public_key_info(in, inlen, PKA_X25519, key->pub, &key_len, LTC_ASN1_EOL, NULL, 0uL)) == CRYPT_OK) {
+ if ((err = x509_decode_subject_public_key_info(in, inlen, LTC_OID_X25519, key->pub, &key_len, LTC_ASN1_EOL, NULL, 0uL)) == CRYPT_OK) {
key->type = PK_PUBLIC;
- key->algo = PKA_X25519;
+ key->algo = LTC_OID_X25519;
}
return err;
}
diff --git a/src/ltc/pk/x25519/x25519_import_pkcs8.c b/src/ltc/pk/x25519/x25519_import_pkcs8.c
index 878df8cd..8b577c31 100644
--- a/src/ltc/pk/x25519/x25519_import_pkcs8.c
+++ b/src/ltc/pk/x25519/x25519_import_pkcs8.c
@@ -22,7 +22,7 @@ int x25519_import_pkcs8(const unsigned char *in, unsigned long inlen,
const void *pwd, unsigned long pwdlen,
curve25519_key *key)
{
- return ec25519_import_pkcs8(in, inlen, pwd, pwdlen, PKA_X25519, tweetnacl_crypto_scalarmult_base, key);
+ return ec25519_import_pkcs8(in, inlen, pwd, pwdlen, LTC_OID_X25519, tweetnacl_crypto_scalarmult_base, key);
}
#endif
diff --git a/src/ltc/pk/x25519/x25519_import_raw.c b/src/ltc/pk/x25519/x25519_import_raw.c
index d118e341..e86e8c6a 100644
--- a/src/ltc/pk/x25519/x25519_import_raw.c
+++ b/src/ltc/pk/x25519/x25519_import_raw.c
@@ -32,7 +32,7 @@ int x25519_import_raw(const unsigned char *in, unsigned long inlen, int which, c
} else {
return CRYPT_INVALID_ARG;
}
- key->algo = PKA_X25519;
+ key->algo = LTC_OID_X25519;
key->type = which;
return CRYPT_OK;
diff --git a/src/ltc/pk/x25519/x25519_import_x509.c b/src/ltc/pk/x25519/x25519_import_x509.c
index 18e0b67d..043b6ad9 100644
--- a/src/ltc/pk/x25519/x25519_import_x509.c
+++ b/src/ltc/pk/x25519/x25519_import_x509.c
@@ -31,13 +31,13 @@ int x25519_import_x509(const unsigned char *in, unsigned long inlen, curve25519_
LTC_ARGCHK(key != NULL);
if ((err = x509_decode_public_key_from_certificate(in, inlen,
- PKA_X25519,
+ LTC_OID_X25519,
LTC_ASN1_EOL, NULL, NULL,
(public_key_decode_cb)s_x25519_decode, key)) != CRYPT_OK) {
return err;
}
key->type = PK_PUBLIC;
- key->algo = PKA_X25519;
+ key->algo = LTC_OID_X25519;
return err;
}
diff --git a/src/ltc/pk/x25519/x25519_make_key.c b/src/ltc/pk/x25519/x25519_make_key.c
index 610eb96f..40276fe9 100644
--- a/src/ltc/pk/x25519/x25519_make_key.c
+++ b/src/ltc/pk/x25519/x25519_make_key.c
@@ -34,7 +34,7 @@ int x25519_make_key(prng_state *prng, int wprng, curve25519_key *key)
tweetnacl_crypto_scalarmult_base(key->pub, key->priv);
key->type = PK_PRIVATE;
- key->algo = PKA_X25519;
+ key->algo = LTC_OID_X25519;
return err;
}