diff --git a/src/core/operations/ECDSASign.mjs b/src/core/operations/ECDSASign.mjs index d7bd32e0..5cce8cc2 100644 --- a/src/core/operations/ECDSASign.mjs +++ b/src/core/operations/ECDSASign.mjs @@ -47,7 +47,7 @@ class ECDSASign extends Operation { type: "option", value: [ "ASN.1 HEX", - "Concat HEX", + "P1363 HEX", "JSON" ] } @@ -83,7 +83,7 @@ class ECDSASign extends Operation { case "ASN.1 HEX": result = signatureASN1Hex; break; - case "Concat HEX": + case "P1363 HEX": result = r.KJUR.crypto.ECDSA.asn1SigToConcatSig(signatureASN1Hex); break; case "JSON": { diff --git a/src/core/operations/ECDSASignatureConversion.mjs b/src/core/operations/ECDSASignatureConversion.mjs index fe5dc3c2..1dfcb4d1 100644 --- a/src/core/operations/ECDSASignatureConversion.mjs +++ b/src/core/operations/ECDSASignatureConversion.mjs @@ -31,7 +31,7 @@ class ECDSASignatureConversion extends Operation { value: [ "Auto", "ASN.1 HEX", - "Concat HEX", + "P1363 HEX", "JSON" ] }, @@ -40,7 +40,7 @@ class ECDSASignatureConversion extends Operation { type: "option", value: [ "ASN.1 HEX", - "Concat HEX", + "P1363 HEX", "JSON" ] } @@ -63,7 +63,7 @@ class ECDSASignatureConversion extends Operation { } else if (input.indexOf("{") !== -1) { inputFormat = "JSON"; } else { - inputFormat = "Concat HEX"; + inputFormat = "P1363 HEX"; } } @@ -73,7 +73,7 @@ class ECDSASignatureConversion extends Operation { case "ASN.1 HEX": signatureASN1Hex = input; break; - case "Concat HEX": + case "P1363 HEX": signatureASN1Hex = r.KJUR.crypto.ECDSA.concatSigToASN1Sig(input); break; case "JSON": { @@ -89,7 +89,7 @@ class ECDSASignatureConversion extends Operation { case "ASN.1 HEX": result = signatureASN1Hex; break; - case "Concat HEX": + case "P1363 HEX": result = r.KJUR.crypto.ECDSA.asn1SigToConcatSig(signatureASN1Hex); break; case "JSON": { diff --git a/src/core/operations/ECDSAVerify.mjs b/src/core/operations/ECDSAVerify.mjs index 68e3a1aa..8f3174a2 100644 --- a/src/core/operations/ECDSAVerify.mjs +++ b/src/core/operations/ECDSAVerify.mjs @@ -32,7 +32,7 @@ class ECDSAVerify extends Operation { value: [ "Auto", "ASN.1 HEX", - "Concat HEX", + "P1363 HEX", "JSON" ] }, @@ -80,7 +80,7 @@ class ECDSAVerify extends Operation { } else if (input.indexOf("{") !== -1) { inputFormat = "JSON"; } else { - inputFormat = "Concat HEX"; + inputFormat = "P1363 HEX"; } } @@ -90,7 +90,7 @@ class ECDSAVerify extends Operation { case "ASN.1 HEX": signatureASN1Hex = input; break; - case "Concat HEX": + case "P1363 HEX": signatureASN1Hex = r.KJUR.crypto.ECDSA.concatSigToASN1Sig(input); break; case "JSON": { diff --git a/tests/operations/tests/ECDSA.mjs b/tests/operations/tests/ECDSA.mjs index dd3013d3..8fe93ef3 100644 --- a/tests/operations/tests/ECDSA.mjs +++ b/tests/operations/tests/ECDSA.mjs @@ -30,7 +30,7 @@ gusgcAE8H6810fkJ8ZmTNiCCa6sLgR2vD1VNh2diirWgKPH4PVMKav5e6Q== signature: { sha256: { asn1: "3046022100e06905608a2fa7dbda9e284c2a7959dfb68fb527a5f003b2d7975ff135145127022100b6baa253793334f8b93ea1dd622bc600124d8090babd807efe3f77b8b324388d", - concat: "e06905608a2fa7dbda9e284c2a7959dfb68fb527a5f003b2d7975ff135145127b6baa253793334f8b93ea1dd622bc600124d8090babd807efe3f77b8b324388d", + p1363: "e06905608a2fa7dbda9e284c2a7959dfb68fb527a5f003b2d7975ff135145127b6baa253793334f8b93ea1dd622bc600124d8090babd807efe3f77b8b324388d", json: `{"r":"00e06905608a2fa7dbda9e284c2a7959dfb68fb527a5f003b2d7975ff135145127","s":"00b6baa253793334f8b93ea1dd622bc600124d8090babd807efe3f77b8b324388d"}` } } @@ -250,8 +250,8 @@ TestRegister.addTests([ ] }, { - name: "ECDSA Verify: P-256 with SHA256 (Concat signature)", - input: P256.signature.sha256.concat, + name: "ECDSA Verify: P-256 with SHA256 (P1363 signature)", + input: P256.signature.sha256.p1363, expectedOutput: "Verified OK", recipeConfig: [ { @@ -307,13 +307,13 @@ TestRegister.addTests([ ] }, { - name: "ECDSA Signature Conversion: ASN.1 To Concat", + name: "ECDSA Signature Conversion: ASN.1 To P1363", input: P256.signature.sha256.asn1, - expectedOutput: P256.signature.sha256.concat, + expectedOutput: P256.signature.sha256.p1363, recipeConfig: [ { "op": "ECDSA Signature Conversion", - "args": ["Auto", "Concat HEX"] + "args": ["Auto", "P1363 HEX"] } ] }, @@ -329,8 +329,8 @@ TestRegister.addTests([ ] }, { - name: "ECDSA Signature Conversion: Concat To ASN.1", - input: P256.signature.sha256.concat, + name: "ECDSA Signature Conversion: P1363 To ASN.1", + input: P256.signature.sha256.p1363, expectedOutput: P256.signature.sha256.asn1, recipeConfig: [ { @@ -340,19 +340,19 @@ TestRegister.addTests([ ] }, { - name: "ECDSA Signature Conversion: Concat To Concat", - input: P256.signature.sha256.concat, - expectedOutput: P256.signature.sha256.concat, + name: "ECDSA Signature Conversion: P1363 To P1363", + input: P256.signature.sha256.p1363, + expectedOutput: P256.signature.sha256.p1363, recipeConfig: [ { "op": "ECDSA Signature Conversion", - "args": ["Auto", "Concat HEX"] + "args": ["Auto", "P1363 HEX"] } ] }, { - name: "ECDSA Signature Conversion: Concat To JSON", - input: P256.signature.sha256.concat, + name: "ECDSA Signature Conversion: P1363 To JSON", + input: P256.signature.sha256.p1363, expectedOutput: P256.signature.sha256.json, recipeConfig: [ { @@ -373,13 +373,13 @@ TestRegister.addTests([ ] }, { - name: "ECDSA Signature Conversion: JSON To Concat", + name: "ECDSA Signature Conversion: JSON To P1363", input: P256.signature.sha256.json, - expectedOutput: P256.signature.sha256.concat, + expectedOutput: P256.signature.sha256.p1363, recipeConfig: [ { "op": "ECDSA Signature Conversion", - "args": ["Auto", "Concat HEX"] + "args": ["Auto", "P1363 HEX"] } ] },