Skip to content

Commit 9867d2d

Browse files
authored
Merge pull request #177
documentation: management key algorithm
2 parents 6dd671d + 585fa56 commit 9867d2d

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

Yubico.YubiKey/src/Yubico/YubiKey/Piv/Commands/InitializeAuthenticateManagementKeyCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ public InitializeAuthenticateManagementKeyCommand()
321321
/// <remarks>
322322
/// Using this constructor is equivalent to
323323
/// <code language="csharp">
324-
/// new InitializeAuthenticateManagementKeyCommand(true, PivAlgorithm.AES192);
324+
/// new InitializeAuthenticateManagementKeyCommand(true, PivAlgorithm.algorithm);
325325
/// </code>
326326
/// </remarks>
327327
public InitializeAuthenticateManagementKeyCommand(PivAlgorithm algorithm)

Yubico.YubiKey/src/Yubico/YubiKey/Piv/Commands/SetManagementKeyCommand.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public sealed class SetManagementKeyCommand : IYubiKeyCommand<SetManagementKeyRe
137137
/// 5.4.2, only Triple-DES (<c>PivAlgorithm.TripleDes</c>) is supported.
138138
/// Beginning with 5.4.2, the Algorithm can be <c>Aes128</c>,
139139
/// <c>Aes192</c>, <c>Aes256</c>, or <c>TripleDes</c>. The default is
140-
/// <c>TripleDes</c>.
140+
/// <c>TripleDes</c> for keys with firmware 5.6.x and earlier and <c>Aes192</c> for YubiKeys with firmware 5.7.x and later.
141141
/// </summary>
142142
public PivAlgorithm Algorithm { get; set; }
143143

@@ -168,8 +168,7 @@ public SetManagementKeyCommand(ReadOnlyMemory<byte> newKey)
168168
/// <summary>
169169
/// Initializes a new instance of the <c>SetManagementKeyCommand</c> class.
170170
/// This command takes the new management key as input and will set the
171-
/// <c>TouchPolicy</c> and <c>Algorithm</c> properties to their
172-
/// respective defaults.
171+
/// <c>TouchPolicy</c> to the default state and the <c>Algorithm</c> to the algorithm provided.
173172
/// </summary>
174173
/// <remarks>
175174
/// This constructor is provided for those developers who want to use the
@@ -184,7 +183,7 @@ public SetManagementKeyCommand(ReadOnlyMemory<byte> newKey)
184183
/// <para>
185184
/// Valid algorithms are <c>PivAlgorithm.TripleDes</c>,
186185
/// <c>PivAlgorithm.Aes128</c>, <c>PivAlgorithm.Aes192</c>, and
187-
/// <c>PivAlgorithm.Aes256</c>. FIPS YubiKeys versions 5.7 and greater require <c>PivAlgorithm.Aes192</c>.
186+
/// <c>PivAlgorithm.Aes256</c>. FIPS YubiKeys versions 5.7 and greater require <c>PivAlgorithm.Aes192</c>. YubiKeys with firmware versions prior to 5.4.2 can only use <c>PivAlgorithm.TripleDes</c>.
188187
/// </para>
189188
/// <para>
190189
/// Note that you need to authenticate the current PIV management key before
@@ -219,7 +218,7 @@ public SetManagementKeyCommand(ReadOnlyMemory<byte> newKey, PivTouchPolicy touch
219218
/// <para>
220219
/// Valid algorithms are <c>PivAlgorithm.TripleDes</c>,
221220
/// <c>PivAlgorithm.Aes128</c>, <c>PivAlgorithm.Aes192</c>, and
222-
/// <c>PivAlgorithm.Aes256</c>. FIPS YubiKeys versions 5.7 and greater require <c>PivAlgorithm.Aes192</c>.
221+
/// <c>PivAlgorithm.Aes256</c>. FIPS YubiKeys versions 5.7 and greater require <c>PivAlgorithm.Aes192</c>. YubiKeys with firmware versions prior to 5.4.2 can only use <c>PivAlgorithm.TripleDes</c>.
223222
/// </para>
224223
/// <para>
225224
/// Note also that you need to authenticate the current PIV management

Yubico.YubiKey/src/Yubico/YubiKey/Piv/PivSession.Pinonly.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ private PivPinOnlyMode GetPinDerivedStatus(
513513

514514
/// <summary>
515515
/// Set the YubiKey's PIV application to be PIN-only with a PIN-derived
516-
/// and/or PIN-Protected management key (Firmware 5.7.x and later: AES-192. Firmware 5.6.x and earlier: TDES.). This sets the
516+
/// and/or PIN-Protected management key. The default management key algorithm will be used (AES-192 for YubiKeys with firmware 5.7.x and later, TDES for keys with firmware 5.6.x and earlier). This sets the
517517
/// YubiKey to either
518518
/// <code>
519519
/// PivPinOnlyMode.PinProtected
@@ -727,7 +727,7 @@ private PivPinOnlyMode GetPinDerivedStatus(
727727
/// </param>
728728
/// <exception cref="InvalidOperationException">
729729
/// There is no <c>KeyCollector</c> loaded, one of the keys provided was
730-
/// not of a valid key algorithm type (Firmware 5.7.x and later: AES-192. Firmware 5.6.x and earlier: TDES.), the data stored on the YubiKey is
730+
/// not of a valid key algorithm type, the data stored on the YubiKey is
731731
/// incompatible with PIN-only, or the YubiKey had some other error, such
732732
/// as unreliable connection.
733733
/// </exception>

0 commit comments

Comments
 (0)