Skip to content

Commit 00c06ee

Browse files
authored
Rename EdDA to EdDsa (Azure#32380)
1 parent 43e0723 commit 00c06ee

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- Added `KeyClient.CreateOkpKey` and `CreateOkpKeyAsync` to create an Octet Key Pair (OKP) on Managed HSM.
99
- Added `KeyType.Okp` and `KeyType.OkpHsm` for `JsonWebKey`.
1010
- Added `KeyCurveName.Ed25519` to create an Octet Key Pair (OKP) using the Ed25519 curve.
11-
- Added `SignatureAlgorithm.EdDSA` to support signing and verifying with an Octet Key Pair (OKP) on Managed HSM.
11+
- Added `SignatureAlgorithm.EdDsa` to support signing and verifying using an Edwards Curve Digital Signature Algorithm (EdDSA) on Managed HSM.
1212

1313
### Breaking Changes
1414

sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.netstandard2.0.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ public LocalCryptographyClientOptions() { }
580580
private readonly object _dummy;
581581
private readonly int _dummyPrimitive;
582582
public SignatureAlgorithm(string value) { throw null; }
583-
public static Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm EdDSA { get { throw null; } }
583+
public static Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm EdDsa { get { throw null; } }
584584
public static Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm ES256 { get { throw null; } }
585585
public static Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm ES256K { get { throw null; } }
586586
public static Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm ES384 { get { throw null; } }

sdk/keyvault/Azure.Security.KeyVault.Keys/src/Cryptography/CryptographyClient.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ public virtual VerifyResult Verify(SignatureAlgorithm algorithm, byte[] digest,
972972
/// <list type="bullet">
973973
/// <item>
974974
/// <term><see cref="SHA256"/></term>
975-
/// <description><see cref="SignatureAlgorithm.EdDSA"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
975+
/// <description><see cref="SignatureAlgorithm.EdDsa"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
976976
/// </item>
977977
/// <item>
978978
/// <term><see cref="SHA384"/></term>
@@ -1051,7 +1051,7 @@ public virtual async Task<SignResult> SignDataAsync(SignatureAlgorithm algorithm
10511051
/// <list type="bullet">
10521052
/// <item>
10531053
/// <term><see cref="SHA256"/></term>
1054-
/// <description><see cref="SignatureAlgorithm.EdDSA"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
1054+
/// <description><see cref="SignatureAlgorithm.EdDsa"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
10551055
/// </item>
10561056
/// <item>
10571057
/// <term><see cref="SHA384"/></term>
@@ -1130,7 +1130,7 @@ public virtual SignResult SignData(SignatureAlgorithm algorithm, byte[] data, Ca
11301130
/// <list type="bullet">
11311131
/// <item>
11321132
/// <term><see cref="SHA256"/></term>
1133-
/// <description><see cref="SignatureAlgorithm.EdDSA"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
1133+
/// <description><see cref="SignatureAlgorithm.EdDsa"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
11341134
/// </item>
11351135
/// <item>
11361136
/// <term><see cref="SHA384"/></term>
@@ -1210,7 +1210,7 @@ public virtual async Task<SignResult> SignDataAsync(SignatureAlgorithm algorithm
12101210
/// <list type="bullet">
12111211
/// <item>
12121212
/// <term><see cref="SHA256"/></term>
1213-
/// <description><see cref="SignatureAlgorithm.EdDSA"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
1213+
/// <description><see cref="SignatureAlgorithm.EdDsa"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
12141214
/// </item>
12151215
/// <item>
12161216
/// <term><see cref="SHA384"/></term>
@@ -1289,7 +1289,7 @@ public virtual SignResult SignData(SignatureAlgorithm algorithm, Stream data, Ca
12891289
/// <list type="bullet">
12901290
/// <item>
12911291
/// <term><see cref="SHA256"/></term>
1292-
/// <description><see cref="SignatureAlgorithm.EdDSA"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
1292+
/// <description><see cref="SignatureAlgorithm.EdDsa"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
12931293
/// </item>
12941294
/// <item>
12951295
/// <term><see cref="SHA384"/></term>
@@ -1369,7 +1369,7 @@ public virtual async Task<VerifyResult> VerifyDataAsync(SignatureAlgorithm algor
13691369
/// <list type="bullet">
13701370
/// <item>
13711371
/// <term><see cref="SHA256"/></term>
1372-
/// <description><see cref="SignatureAlgorithm.EdDSA"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
1372+
/// <description><see cref="SignatureAlgorithm.EdDsa"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
13731373
/// </item>
13741374
/// <item>
13751375
/// <term><see cref="SHA384"/></term>
@@ -1448,7 +1448,7 @@ public virtual VerifyResult VerifyData(SignatureAlgorithm algorithm, byte[] data
14481448
/// <list type="bullet">
14491449
/// <item>
14501450
/// <term><see cref="SHA256"/></term>
1451-
/// <description><see cref="SignatureAlgorithm.EdDSA"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
1451+
/// <description><see cref="SignatureAlgorithm.EdDsa"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
14521452
/// </item>
14531453
/// <item>
14541454
/// <term><see cref="SHA384"/></term>
@@ -1528,7 +1528,7 @@ public virtual async Task<VerifyResult> VerifyDataAsync(SignatureAlgorithm algor
15281528
/// <list type="bullet">
15291529
/// <item>
15301530
/// <term><see cref="SHA256"/></term>
1531-
/// <description><see cref="SignatureAlgorithm.EdDSA"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
1531+
/// <description><see cref="SignatureAlgorithm.EdDsa"/>, <see cref="SignatureAlgorithm.ES256"/>, <see cref="SignatureAlgorithm.ES256K"/>, <see cref="SignatureAlgorithm.PS256"/>, <see cref="SignatureAlgorithm.RS256"/></description>
15321532
/// </item>
15331533
/// <item>
15341534
/// <term><see cref="SHA384"/></term>

sdk/keyvault/Azure.Security.KeyVault.Keys/src/Cryptography/SignatureAlgorithm.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace Azure.Security.KeyVault.Keys.Cryptography
2222
internal const string ES384Value = "ES384";
2323
internal const string ES512Value = "ES512";
2424
internal const string ES256KValue = "ES256K";
25-
internal const string EdDSAValue = "EdDSA";
25+
internal const string EdDsaValue = "EdDSA";
2626

2727
private readonly string _value;
2828

@@ -88,7 +88,7 @@ public SignatureAlgorithm(string value)
8888
/// <summary>
8989
/// Gets an ECDSA with a secp256k1 curve <see cref="SignatureAlgorithm"/> as described in <see href="https://tools.ietf.org/html/rfc8032"/>.
9090
/// </summary>
91-
public static SignatureAlgorithm EdDSA { get; } = new SignatureAlgorithm(EdDSAValue);
91+
public static SignatureAlgorithm EdDsa { get; } = new SignatureAlgorithm(EdDsaValue);
9292

9393
/// <summary>
9494
/// Determines if two <see cref="SignatureAlgorithm"/> values are the same.
@@ -134,7 +134,7 @@ internal HashAlgorithm GetHashAlgorithm()
134134
case PS256Value:
135135
case ES256Value:
136136
case ES256KValue:
137-
case EdDSAValue:
137+
case EdDsaValue:
138138
return SHA256.Create();
139139

140140
case RS384Value:
@@ -160,7 +160,7 @@ internal HashAlgorithmName GetHashAlgorithmName()
160160
case PS256Value:
161161
case ES256Value:
162162
case ES256KValue:
163-
case EdDSAValue:
163+
case EdDsaValue:
164164
return HashAlgorithmName.SHA256;
165165

166166
case RS384Value:

sdk/keyvault/Azure.Security.KeyVault.Keys/tests/CryptographyClientLiveTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public async Task WrapUnwrapRoundTrip([EnumValues(Exclude = new[] { nameof(KeyWr
8383
}
8484

8585
[RecordedTest]
86-
public async Task SignVerifyDataRoundTrip([EnumValues(Exclude = new[] {SignatureAlgorithm.EdDSAValue})] SignatureAlgorithm algorithm)
86+
public async Task SignVerifyDataRoundTrip([EnumValues(Exclude = new[] { nameof(SignatureAlgorithm.EdDsa) })] SignatureAlgorithm algorithm)
8787
{
8888
KeyVaultKey key = await CreateTestKey(algorithm);
8989
RegisterForCleanup(key.Name);
@@ -125,7 +125,7 @@ public async Task SignVerifyDataRoundTrip([EnumValues(Exclude = new[] {Signature
125125
}
126126

127127
[RecordedTest]
128-
public async Task SignVerifyDataStreamRoundTrip([EnumValues(Exclude = new[] { SignatureAlgorithm.EdDSAValue })] SignatureAlgorithm algorithm)
128+
public async Task SignVerifyDataStreamRoundTrip([EnumValues(Exclude = new[] { nameof(SignatureAlgorithm.EdDsa) })] SignatureAlgorithm algorithm)
129129
{
130130
KeyVaultKey key = await CreateTestKey(algorithm);
131131
RegisterForCleanup(key.Name);
@@ -175,7 +175,7 @@ public async Task SignVerifyDataStreamRoundTrip([EnumValues(Exclude = new[] { Si
175175
// We do not test using ES256K below since macOS doesn't support it; various ideas to work around that adversely affect runtime code too much.
176176

177177
[RecordedTest]
178-
public async Task LocalSignVerifyRoundTrip([EnumValues(Exclude = new[] { nameof(SignatureAlgorithm.ES256K), nameof(SignatureAlgorithm.EdDSA) })] SignatureAlgorithm algorithm)
178+
public async Task LocalSignVerifyRoundTrip([EnumValues(Exclude = new[] { nameof(SignatureAlgorithm.ES256K), nameof(SignatureAlgorithm.EdDsa) })] SignatureAlgorithm algorithm)
179179
{
180180
#if NET461
181181
if (algorithm.GetEcKeyCurveName() != default)
@@ -252,7 +252,7 @@ public async Task LocalSignVerifyRoundTripOnFramework([EnumValues(nameof(Signatu
252252
}
253253

254254
[RecordedTest]
255-
public async Task SignLocalVerifyRoundTrip([EnumValues(Exclude = new[] { nameof(SignatureAlgorithm.ES256K), nameof(SignatureAlgorithm.EdDSA) })] SignatureAlgorithm algorithm)
255+
public async Task SignLocalVerifyRoundTrip([EnumValues(Exclude = new[] { nameof(SignatureAlgorithm.ES256K), nameof(SignatureAlgorithm.EdDsa) })] SignatureAlgorithm algorithm)
256256
{
257257
#if NET461
258258
if (algorithm.GetEcKeyCurveName() != default)
@@ -482,7 +482,7 @@ protected async Task<KeyVaultKey> CreateTestKey(SignatureAlgorithm algorithm)
482482
return await Client.CreateEcKeyAsync(new CreateEcKeyOptions(keyName, false) { CurveName = KeyCurveName.P384 });
483483
case SignatureAlgorithm.ES512Value:
484484
return await Client.CreateEcKeyAsync(new CreateEcKeyOptions(keyName, false) { CurveName = KeyCurveName.P521 });
485-
case SignatureAlgorithm.EdDSAValue:
485+
case SignatureAlgorithm.EdDsaValue:
486486
return await Client.CreateOkpKeyAsync(new CreateOkpKeyOptions(keyName, false) { CurveName = KeyCurveName.Ed25519 });
487487
default:
488488
throw new ArgumentException("Invalid Algorithm", nameof(algorithm));

sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeyUtilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static JsonWebKey CreateKey(SignatureAlgorithm algorithm, bool includePri
4747
}
4848
#endif
4949

50-
case SignatureAlgorithm.EdDSAValue:
50+
case SignatureAlgorithm.EdDsaValue:
5151
// TODO: Support OKP keys and Ed25519 curves: https://github.com/Azure/azure-sdk-for-net/issues/32232
5252
throw new IgnoreException("Creating client-side OKP keys is not supported.");
5353

sdk/keyvault/Azure.Security.KeyVault.Keys/tests/ManagedHsmCryptographyClientLiveTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public async Task AesKwWrapUnwrapRoundTrip([EnumValues(
199199
[RecordedTest]
200200
public async Task EdDSASignVerifyRoundTrip()
201201
{
202-
SignatureAlgorithm algorithm = SignatureAlgorithm.EdDSA;
202+
SignatureAlgorithm algorithm = SignatureAlgorithm.EdDsa;
203203

204204
KeyVaultKey key = await CreateTestKey(algorithm);
205205
RegisterForCleanup(key.Name);

0 commit comments

Comments
 (0)