aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/model/GpgGenKeyInfo.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-11-24 19:06:17 +0000
committersaturneric <[email protected]>2024-11-24 19:06:17 +0000
commitcf9da49f452e0b42dd615c3d0950c158557ce06d (patch)
tree49c41ca0e855b9ebe9bf5ddf0aa6ea394299244f /src/core/model/GpgGenKeyInfo.cpp
parentfix: ed448 should allow signing function (diff)
downloadGpgFrontend-cf9da49f452e0b42dd615c3d0950c158557ce06d.tar.gz
GpgFrontend-cf9da49f452e0b42dd615c3d0950c158557ce06d.zip
feat: support secp256k1 algo and ed448 primary key
Diffstat (limited to 'src/core/model/GpgGenKeyInfo.cpp')
-rw-r--r--src/core/model/GpgGenKeyInfo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/model/GpgGenKeyInfo.cpp b/src/core/model/GpgGenKeyInfo.cpp
index 7b884a07..1514c3bc 100644
--- a/src/core/model/GpgGenKeyInfo.cpp
+++ b/src/core/model/GpgGenKeyInfo.cpp
@@ -128,7 +128,8 @@ void GenKeyInfo::SetAlgo(const QString &t_algo_args) {
SetKeyLength(-1);
} else if (algo_args == "nistp256" || algo_args == "nistp384" ||
algo_args == "nistp521" || algo_args == "brainpoolp256r1" ||
- algo_args == "brainpoolp384r1" || algo_args == "brainpoolp512r1") {
+ algo_args == "brainpoolp384r1" || algo_args == "brainpoolp512r1" ||
+ algo_args == "secp256k1") {
if (!subkey_) { // for primary key is always ecdsa
SetAllowEncryption(false);
@@ -240,7 +241,9 @@ auto GenKeyInfo::GetSupportedKeyAlgo()
k_support_key_algo = {
{"RSA", "RSA", ""},
{"DSA", "DSA", ""},
+ {"EdDSA (ED448)", "ED448", ""},
{"ECDSA (ED25519)", "ED25519", ""},
+ {"ECDSA (SECP256K1)", "SECP256K1", ""},
{"ECDSA (NIST P-256)", "NISTP256", ""},
{"ECDSA (NIST P-384)", "NISTP384", ""},
{"ECDSA (NIST P-521)", "NISTP521", ""},
@@ -287,8 +290,9 @@ auto GenKeyInfo::GetSupportedSubkeyAlgo()
{"DSA", "", "DSA"},
{"ELG-E", "", "ELG"},
{"ECDSA (ED25519)", "", "ED25519"},
- {"ECDSA (ED448)", "", "ED448"},
{"ECDH (CV25519)", "", "CV25519"},
+ {"ECDH (SECP256K1)", "", "SECP256K1"},
+ {"EdDSA (ED448)", "", "ED448"},
{"ECDH (X448)", "", "X448"},
{"ECDH (NIST P-256)", "", "NISTP256"},
{"ECDH (NIST P-384)", "", "NISTP384"},