Rename C25519.* to ECC.*

This commit is contained in:
Adam Ierymenko 2024-09-15 17:34:01 -04:00
parent 7647c8e8d1
commit 307befa892
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
22 changed files with 111 additions and 114 deletions

10
one.cpp
View file

@ -13,7 +13,7 @@
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#include "node/C25519.hpp"
#include "node/ECC.hpp"
#endif
#include <stdio.h>
@ -1553,7 +1553,7 @@ static int idtool(int argc,char **argv)
fprintf(stderr,"%s is not readable" ZT_EOL_S,argv[3]);
return 1;
}
C25519::Signature signature = id.sign(inf.data(),(unsigned int)inf.length());
ECC::Signature signature = id.sign(inf.data(),(unsigned int)inf.length());
char hexbuf[1024];
printf("%s",Utils::hex(signature.data,ZT_ECC_SIGNATURE_LEN,hexbuf));
} else if (!strcmp(argv[1],"verify")) {
@ -1603,7 +1603,7 @@ static int idtool(int argc,char **argv)
return 1;
}
C25519::Pair kp(C25519::generate());
ECC::Pair kp(ECC::generate());
char idtmp[4096];
nlohmann::json mj;
@ -1647,8 +1647,8 @@ static int idtool(int argc,char **argv)
return 1;
}
C25519::Pair signingKey;
C25519::Public updatesMustBeSignedBy;
ECC::Pair signingKey;
ECC::Public updatesMustBeSignedBy;
Utils::unhex(OSUtils::jsonString(mj["signingKey"],"").c_str(),signingKey.pub.data,ZT_ECC_PUBLIC_KEY_SET_LEN);
Utils::unhex(OSUtils::jsonString(mj["signingKey_SECRET"],"").c_str(),signingKey.priv.data,ZT_ECC_PRIVATE_KEY_SET_LEN);
Utils::unhex(OSUtils::jsonString(mj["updatesMustBeSignedBy"],"").c_str(),updatesMustBeSignedBy.data,ZT_ECC_PUBLIC_KEY_SET_LEN);