Skip to content

Latest commit

 

History

History
841 lines (615 loc) · 28.8 KB

6.ChallengeAuth.md

File metadata and controls

841 lines (615 loc) · 28.8 KB

6. Test Case for CHALLENGE_AUTH

Case 6.1

Description: SPDM responder shall return valid CHALLENGE_AUTH, if it receives a CHALLENGE with negotiated version 1.0 or 1.1 in (A1, B1, C1).

SPDM Version: 1.0 or 1.1

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. If 1.0 or 1.1 is not in VERSION.VersionNumberEntry, then skip this case.
  4. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  5. CAPABILITIES <- Responder
  6. If Flags.CERT_CAP == 0 || Flags.CHAL_CAP == 0, then skip this case.
  7. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  8. ALGORITHMS <- Responder
  9. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  10. DIGESTS <- Responder
  11. ValidSlotID[] = array of bit-index that SlotMask[bit-index]=1 from DIGEST.Param2.SlotMask
  12. Digests[] = array of DIGESTS.Digest
  13. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  14. CERTIFICATE <- Responder

TestTeardown: None

Steps:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  4. CAPABILITIES <- Responder
  5. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  6. ALGORITHMS <- Responder
  7. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  8. DIGESTS <- Responder
  9. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  10. CERTIFICATE <- Responder
  11. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], Param2=NoMeasurement, Nonce}
  12. SpdmMessage <- Responder

Assertion 6.1.1: sizeof(SpdmMessage) >= sizeof(CHALLENGE_AUTH) + SpdmMessage.OpaqueDataLength

Assertion 6.1.2: SpdmMessage.RequestResponseCode == CHALLENGE_AUTH

Assertion 6.1.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 6.1.4: (SpdmMessage.Param1.SlotID & 0xF) == SlotID

Assertion 6.1.5: (SpdmMessage.Param2.SlotMask & bit_[SlotID]) != 0

Assertion 6.1.6: SpdmMessage.CertChainHash == Hash(CertChain) SpdmMessage.CertChainHash == Digests[SlotID]

Assertion 6.1.7: SPDMsignatureVerify (PubKey, SpdmMessage.Signature, M1/M2) version 1.0/1.1 success.

  1. Repeat (1~12) and use CHALLENGE {Param2=TcbMeasurements}, if Flags.MEAS_CAP != 0.

Assertion 6.1.*.

  1. Repeat (1~12) and use CHALLENGE {Param2=AllMeasurement}, if Flags.MEAS_CAP != 0.

Assertion 6.1.*.

Case 6.2

Description: SPDM responder shall return valid CHALLENGE_AUTH, if it receives a CHALLENGE with negotiated version 1.0 or 1.1 in (A1, B2, C1).

SPDM Version: 1.0 or 1.1

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. If 1.0 or 1.1 is not in VERSION.VersionNumberEntry, then skip this case.
  4. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  5. CAPABILITIES <- Responder
  6. If Flags.CERT_CAP == 0 || Flags.CHAL_CAP == 0, then skip this case.
  7. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  8. ALGORITHMS <- Responder
  9. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  10. DIGESTS <- Responder
  11. ValidSlotID[] = array of bit-index that SlotMask[bit-index]=1 from DIGEST.Param2.SlotMask
  12. Digests[] = array of DIGESTS.Digest
  13. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  14. CERTIFICATE <- Responder

TestTeardown: None

Steps:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  4. CAPABILITIES <- Responder
  5. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  6. ALGORITHMS <- Responder
  7. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], Param2=NoMeasurement, Nonce}
  8. SpdmMessage <- Responder

Assertion 6.2.1: sizeof(SpdmMessage) >= sizeof(CHALLENGE_AUTH) + SpdmMessage.OpaqueDataLength

Assertion 6.2.2: SpdmMessage.RequestResponseCode == CHALLENGE_AUTH

Assertion 6.2.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 6.2.4: (SpdmMessage.Param1.SlotID & 0xF) == SlotID

Assertion 6.2.5: (SpdmMessage.Param2.SlotMask & bit_[SlotID]) != 0

Assertion 6.2.6: SpdmMessage.CertChainHash == Hash(CertChain) SpdmMessage.CertChainHash == Digests[SlotID]

Assertion 6.2.7: SPDMsignatureVerify (PubKey, SpdmMessage.Signature, M1/M2) version 1.0/1.1 success.

  1. Repeat (1~8) and use CHALLENGE {Param2=TcbMeasurements}, if Flags.MEAS_CAP != 0.

Assertion 6.2.*.

  1. Repeat (1~8) and use CHALLENGE {Param2=AllMeasurement}, if Flags.MEAS_CAP != 0.

Assertion 6.2.*.

Case 6.3

Description: SPDM responder shall return valid CHALLENGE_AUTH, if it receives a CHALLENGE with negotiated version 1.0 or 1.1 in (A1, B3, C1).

SPDM Version: 1.0 or 1.1

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. If 1.0 or 1.1 is not in VERSION.VersionNumberEntry, then skip this case.
  4. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  5. CAPABILITIES <- Responder
  6. If Flags.CERT_CAP == 0 || Flags.CHAL_CAP == 0, then skip this case.
  7. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  8. ALGORITHMS <- Responder
  9. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  10. DIGESTS <- Responder
  11. ValidSlotID[] = array of bit-index that SlotMask[bit-index]=1 from DIGEST.Param2.SlotMask
  12. Digests[] = array of DIGESTS.Digest
  13. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  14. CERTIFICATE <- Responder

TestTeardown: None

Steps:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  4. CAPABILITIES <- Responder
  5. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  6. ALGORITHMS <- Responder
  7. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  8. DIGESTS <- Responder
  9. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], Param2=NoMeasurement, Nonce}
  10. SpdmMessage <- Responder

Assertion 6.3.1: sizeof(SpdmMessage) >= sizeof(CHALLENGE_AUTH) + SpdmMessage.OpaqueDataLength

Assertion 6.3.2: SpdmMessage.RequestResponseCode == CHALLENGE_AUTH

Assertion 6.3.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 6.3.4: (SpdmMessage.Param1.SlotID & 0xF) == SlotID

Assertion 6.3.5: (SpdmMessage.Param2.SlotMask & bit_[SlotID]) != 0

Assertion 6.3.6: SpdmMessage.CertChainHash == Hash(CertChain) SpdmMessage.CertChainHash == Digests[SlotID]

Assertion 6.3.7: SPDMsignatureVerify (PubKey, SpdmMessage.Signature, M1/M2) version 1.0/1.1 success.

  1. Repeat (1~10) and use CHALLENGE {Param2=TcbMeasurements}, if Flags.MEAS_CAP != 0.

Assertion 6.3.*.

  1. Repeat (1~10) and use CHALLENGE {Param2=AllMeasurement}, if Flags.MEAS_CAP != 0.

Assertion 6.3.*.

Case 6.4

Description: SPDM responder shall return ERROR(VersionMismatch), if it receives a CHALLENGE with non negotiated version.

SPDM Version: 1.0+

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  4. CAPABILITIES <- Responder
  5. If Flags.CERT_CAP == 0 || Flags.CHAL_CAP == 0, then skip this case.
  6. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  7. ALGORITHMS <- Responder
  8. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  9. DIGESTS <- Responder
  10. ValidSlotID[] = array of bit-index that SlotMask[bit-index]=1 from DIGEST.Param2.SlotMask
  11. Digests[] = array of DIGESTS.Digest
  12. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  13. CERTIFICATE <- Responder

TestTeardown: None

Steps:

  1. Requester -> CHALLENGE {SPDMVersion=(NegotiatedVersion+1), ...}
  2. SpdmMessage <- Responder

Assertion 6.4.1: sizeof(SpdmMessage) >= sizeof(ERROR)

Assertion 6.4.2: SpdmMessage.RequestResponseCode == ERROR

Assertion 6.4.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 6.4.4: SpdmMessage.Param1 == VersionMismatch.

Assertion 6.4.5: SpdmMessage.Param2 == 0.

  1. Requester -> CHALLENGE {SPDMVersion=(NegotiatedVersion-1), ...}
  2. SpdmMessage <- Responder

Assertion 6.4.*.

Case 6.5

Description: SPDM responder shall return ERROR(UnexpectedRequest), if it receives a GET_CERTIFICATE before NEGOTIATE_ALGORITHMS.

SPDM Version: 1.0+

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  4. CAPABILITIES <- Responder
  5. If Flags.CERT_CAP == 0 || Flags.CHAL_CAP == 0, then skip this case.

TestTeardown: None

Steps:

  1. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, ...}
  2. SpdmMessage <- Responder

Assertion 6.5.1: sizeof(SpdmMessage) >= sizeof(ERROR)

Assertion 6.5.2: SpdmMessage.RequestResponseCode == ERROR

Assertion 6.5.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 6.5.4: SpdmMessage.Param1 == UnexpectedRequest.

Assertion 6.5.5: SpdmMessage.Param2 == 0.

Case 6.6

Description: SPDM responder shall return ERROR(InvalidRequest), if it receives a CHALLENGE with invalid field.

SPDM Version: 1.0+

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  4. CAPABILITIES <- Responder
  5. If Flags.CERT_CAP == 0 || Flags.CHAL_CAP == 0, then skip this case.
  6. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  7. ALGORITHMS <- Responder
  8. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  9. DIGESTS <- Responder
  10. InvalidSlotID[] = array of bit-index that SlotMask[bit-index]=0 from DIGEST.Param2.SlotMask + {0x8 ~ 0xF, 0xFF}

TestTeardown: None

Steps:

  1. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=InvalidSlotID[i], Param2=NoMeasurement}
  2. SpdmMessage <- Responder

Assertion 6.6.1: sizeof(SpdmMessage) >= sizeof(ERROR)

Assertion 6.6.2: SpdmMessage.RequestResponseCode == ERROR

Assertion 6.6.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 6.6.4: SpdmMessage.Param1 == InvalidRequest.

Assertion 6.6.5: SpdmMessage.Param2 == 0.

  1. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=0, Param2=(TcbMeasurements+1)}
  2. SpdmMessage <- Responder

Assertion 6.6.*.

  1. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=0, Param2=(AllMeasurements-1)}
  2. SpdmMessage <- Responder

Assertion 6.6.*.

Case 6.7

Description: SPDM responder shall return valid CHALLENGE_AUTH, if it receives a CHALLENGE with negotiated version 1.2 in (A1, B1, C1).

SPDM Version: 1.2 only

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. If 1.2 is not in VERSION.VersionNumberEntry, then skip this case.
  4. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  5. CAPABILITIES <- Responder
  6. If Flags.CERT_CAP == 0 || Flags.CHAL_CAP == 0, then skip this case.
  7. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  8. ALGORITHMS <- Responder
  9. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  10. DIGESTS <- Responder
  11. ValidSlotID[] = array of bit-index that SlotMask[bit-index]=1 from DIGEST.Param2.SlotMask
  12. Digests[] = array of DIGESTS.Digest
  13. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  14. CERTIFICATE <- Responder

TestTeardown: None

Steps:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  4. CAPABILITIES <- Responder
  5. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  6. ALGORITHMS <- Responder
  7. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  8. DIGESTS <- Responder
  9. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  10. CERTIFICATE <- Responder
  11. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], Param2=NoMeasurement, Nonce}
  12. SpdmMessage <- Responder

Assertion 6.7.1: sizeof(SpdmMessage) >= sizeof(CHALLENGE_AUTH) + SpdmMessage.OpaqueDataLength

Assertion 6.7.2: SpdmMessage.RequestResponseCode == CHALLENGE_AUTH

Assertion 6.7.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 6.7.4: (SpdmMessage.Param1.SlotID & 0xF) == SlotID

Assertion 6.7.5: (SpdmMessage.Param2.SlotMask & bit_[SlotID]) != 0

Assertion 6.7.6: SpdmMessage.CertChainHash == Hash(CertChain) SpdmMessage.CertChainHash == Digests[SlotID]

Assertion 6.7.7: SPDMsignatureVerify (PubKey, SpdmMessage.Signature, M1/M2) version 1.2 success.

  1. Repeat (1~12) and use CHALLENGE {Param2=TcbMeasurements}, if Flags.MEAS_CAP != 0.

Assertion 6.7.*.

  1. Repeat (1~12) and use CHALLENGE {Param2=AllMeasurement}, if Flags.MEAS_CAP != 0.

Assertion 6.7.*.

Case 6.8

Description: SPDM responder shall return valid CHALLENGE_AUTH, if it receives a CHALLENGE with negotiated version 1.2 in (A1, B2, C1).

SPDM Version: 1.2 only

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. If 1.2 is not in VERSION.VersionNumberEntry, then skip this case.
  4. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  5. CAPABILITIES <- Responder
  6. If Flags.CERT_CAP == 0 || Flags.CHAL_CAP == 0, then skip this case.
  7. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  8. ALGORITHMS <- Responder
  9. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  10. DIGESTS <- Responder
  11. ValidSlotID[] = array of bit-index that SlotMask[bit-index]=1 from DIGEST.Param2.SlotMask
  12. Digests[] = array of DIGESTS.Digest
  13. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  14. CERTIFICATE <- Responder

TestTeardown: None

Steps:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  4. CAPABILITIES <- Responder
  5. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  6. ALGORITHMS <- Responder
  7. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], Param2=NoMeasurement, Nonce}
  8. SpdmMessage <- Responder

Assertion 6.8.1: sizeof(SpdmMessage) >= sizeof(CHALLENGE_AUTH) + SpdmMessage.OpaqueDataLength

Assertion 6.8.2: SpdmMessage.RequestResponseCode == CHALLENGE_AUTH

Assertion 6.8.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 6.8.4: (SpdmMessage.Param1.SlotID & 0xF) == SlotID

Assertion 6.8.5: (SpdmMessage.Param2.SlotMask & bit_[SlotID]) != 0

Assertion 6.8.6: SpdmMessage.CertChainHash == Hash(CertChain) SpdmMessage.CertChainHash == Digests[SlotID]

Assertion 6.8.7: SPDMsignatureVerify (PubKey, SpdmMessage.Signature, M1/M2) version 1.2 success.

  1. Repeat (1~8) and use CHALLENGE {Param2=TcbMeasurements}, if Flags.MEAS_CAP != 0.

Assertion 6.8.*.

  1. Repeat (1~8) and use CHALLENGE {Param2=AllMeasurement}, if Flags.MEAS_CAP != 0.

Assertion 6.8.*.

Case 6.9

Description: SPDM responder shall return valid CHALLENGE_AUTH, if it receives a CHALLENGE with negotiated version 1.2 in (A1, B3, C1).

SPDM Version: 1.2 only

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. If 1.2 is not in VERSION.VersionNumberEntry, then skip this case.
  4. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  5. CAPABILITIES <- Responder
  6. If Flags.CERT_CAP == 0 || Flags.CHAL_CAP == 0, then skip this case.
  7. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  8. ALGORITHMS <- Responder
  9. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  10. DIGESTS <- Responder
  11. ValidSlotID[] = array of bit-index that SlotMask[bit-index]=1 from DIGEST.Param2.SlotMask
  12. Digests[] = array of DIGESTS.Digest
  13. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  14. CERTIFICATE <- Responder

TestTeardown: None

Steps:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  4. CAPABILITIES <- Responder
  5. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  6. ALGORITHMS <- Responder
  7. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  8. DIGESTS <- Responder
  9. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], Param2=NoMeasurement, Nonce}
  10. SpdmMessage <- Responder

Assertion 6.9.1: sizeof(SpdmMessage) >= sizeof(CHALLENGE_AUTH) + SpdmMessage.OpaqueDataLength

Assertion 6.9.2: SpdmMessage.RequestResponseCode == CHALLENGE_AUTH

Assertion 6.9.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 6.9.4: (SpdmMessage.Param1.SlotID & 0xF) == SlotID

Assertion 6.9.5: (SpdmMessage.Param2.SlotMask & bit_[SlotID]) != 0

Assertion 6.9.6: SpdmMessage.CertChainHash == Hash(CertChain) SpdmMessage.CertChainHash == Digests[SlotID]

Assertion 6.9.7: SPDMsignatureVerify (PubKey, SpdmMessage.Signature, M1/M2) version 1.2 success.

  1. Repeat (1~10) and use CHALLENGE {Param2=TcbMeasurements}, if Flags.MEAS_CAP != 0.

Assertion 6.9.*.

  1. Repeat (1~10) and use CHALLENGE {Param2=AllMeasurement}, if Flags.MEAS_CAP != 0.

Assertion 6.9.*.

Case 6.10

Description: SPDM responder shall return valid CHALLENGE_AUTH, if it receives a CHALLENGE with negotiated version 1.2 in (A1, B4, C1).

SPDM Version: 1.2 only

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. If 1.2 is not in VERSION.VersionNumberEntry, then skip this case.
  4. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  5. CAPABILITIES <- Responder
  6. If Flags.CERT_CAP == 0 || Flags.CHAL_CAP == 0, then skip this case.
  7. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  8. ALGORITHMS <- Responder
  9. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  10. DIGESTS <- Responder
  11. ValidSlotID[] = array of bit-index that SlotMask[bit-index]=1 from DIGEST.Param2.SlotMask
  12. Digests[] = array of DIGESTS.Digest
  13. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  14. CERTIFICATE <- Responder

TestTeardown: None

Steps:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  4. CAPABILITIES <- Responder
  5. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  6. ALGORITHMS <- Responder
  7. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  8. CERTIFICATE <- Responder
  9. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], Param2=NoMeasurement, Nonce}
  10. SpdmMessage <- Responder

Assertion 6.10.1: sizeof(SpdmMessage) >= sizeof(CHALLENGE_AUTH) + SpdmMessage.OpaqueDataLength

Assertion 6.10.2: SpdmMessage.RequestResponseCode == CHALLENGE_AUTH

Assertion 6.10.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 6.10.4: (SpdmMessage.Param1.SlotID & 0xF) == SlotID

Assertion 6.10.5: (SpdmMessage.Param2.SlotMask & bit_[SlotID]) != 0

Assertion 6.10.6: SpdmMessage.CertChainHash == Hash(CertChain) SpdmMessage.CertChainHash == Digests[SlotID]

Assertion 6.10.7: SPDMsignatureVerify (PubKey, SpdmMessage.Signature, M1/M2) version 1.2 success.

  1. Repeat (1~10) and use CHALLENGE {Param2=TcbMeasurements}, if Flags.MEAS_CAP != 0.

Assertion 6.10.*.

  1. Repeat (1~10) and use CHALLENGE {Param2=AllMeasurement}, if Flags.MEAS_CAP != 0.

Assertion 6.10.*.

Case 6.11

Description: SPDM responder shall return valid CHALLENGE_AUTH, if it receives a CHALLENGE with negotiated version 1.2 in (A2, B1, C1).

SPDM Version: 1.2 only

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. If 1.2 is not in VERSION.VersionNumberEntry, then skip this case.
  4. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  5. CAPABILITIES <- Responder
  6. If Flags.CERT_CAP == 0 || Flags.CHAL_CAP == 0, then skip this case.
  7. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  8. ALGORITHMS <- Responder
  9. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  10. DIGESTS <- Responder
  11. ValidSlotID[] = array of bit-index that SlotMask[bit-index]=1 from DIGEST.Param2.SlotMask
  12. Digests[] = array of DIGESTS.Digest
  13. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  14. CERTIFICATE <- Responder
  15. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], Param2=NoMeasurement, ...}
  16. SpdmMessage <- Responder

TestTeardown: None

Steps:

  1. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  2. DIGESTS <- Responder
  3. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  4. CERTIFICATE <- Responder
  5. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], Param2=NoMeasurement, Nonce}
  6. SpdmMessage <- Responder

Assertion 6.11.1: sizeof(SpdmMessage) >= sizeof(CHALLENGE_AUTH) + SpdmMessage.OpaqueDataLength

Assertion 6.11.2: SpdmMessage.RequestResponseCode == CHALLENGE_AUTH

Assertion 6.11.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 6.11.4: (SpdmMessage.Param1.SlotID & 0xF) == SlotID

Assertion 6.11.5: (SpdmMessage.Param2.SlotMask & bit_[SlotID]) != 0

Assertion 6.11.6: SpdmMessage.CertChainHash == Hash(CertChain) SpdmMessage.CertChainHash == Digests[SlotID]

Assertion 6.11.7: SPDMsignatureVerify (PubKey, SpdmMessage.Signature, M1/M2) version 1.2 success.

  1. Repeat (1~6) and use CHALLENGE {Param2=TcbMeasurements}, if Flags.MEAS_CAP != 0.

Assertion 6.11.*.

  1. Repeat (1~6) and use CHALLENGE {Param2=AllMeasurement}, if Flags.MEAS_CAP != 0.

Assertion 6.11.*.

Case 6.12

Description: SPDM responder shall return valid CHALLENGE_AUTH, if it receives a CHALLENGE with negotiated version 1.2 in (A2, B2, C1).

SPDM Version: 1.2 only

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. If 1.2 is not in VERSION.VersionNumberEntry, then skip this case.
  4. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  5. CAPABILITIES <- Responder
  6. If Flags.CERT_CAP == 0 || Flags.CHAL_CAP == 0, then skip this case.
  7. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  8. ALGORITHMS <- Responder
  9. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  10. DIGESTS <- Responder
  11. ValidSlotID[] = array of bit-index that SlotMask[bit-index]=1 from DIGEST.Param2.SlotMask
  12. Digests[] = array of DIGESTS.Digest
  13. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  14. CERTIFICATE <- Responder
  15. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], Param2=NoMeasurement, ...}
  16. SpdmMessage <- Responder

TestTeardown: None

Steps:

  1. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], Param2=NoMeasurement, Nonce}
  2. SpdmMessage <- Responder

Assertion 6.12.1: sizeof(SpdmMessage) >= sizeof(CHALLENGE_AUTH) + SpdmMessage.OpaqueDataLength

Assertion 6.12.2: SpdmMessage.RequestResponseCode == CHALLENGE_AUTH

Assertion 6.12.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 6.12.4: (SpdmMessage.Param1.SlotID & 0xF) == SlotID

Assertion 6.12.5: (SpdmMessage.Param2.SlotMask & bit_[SlotID]) != 0

Assertion 6.12.6: SpdmMessage.CertChainHash == Hash(CertChain) SpdmMessage.CertChainHash == Digests[SlotID]

Assertion 6.12.7: SPDMsignatureVerify (PubKey, SpdmMessage.Signature, M1/M2) version 1.2 success.

  1. Repeat (1~2) and use CHALLENGE {Param2=TcbMeasurements}, if Flags.MEAS_CAP != 0.

Assertion 6.12.*.

  1. Repeat (1~2) and use CHALLENGE {Param2=AllMeasurement}, if Flags.MEAS_CAP != 0.

Assertion 6.12.*.

Case 6.13

Description: SPDM responder shall return valid CHALLENGE_AUTH, if it receives a CHALLENGE with negotiated version 1.2 in (A2, B3, C1).

SPDM Version: 1.2 only

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. If 1.2 is not in VERSION.VersionNumberEntry, then skip this case.
  4. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  5. CAPABILITIES <- Responder
  6. If Flags.CERT_CAP == 0 || Flags.CHAL_CAP == 0, then skip this case.
  7. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  8. ALGORITHMS <- Responder
  9. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  10. DIGESTS <- Responder
  11. ValidSlotID[] = array of bit-index that SlotMask[bit-index]=1 from DIGEST.Param2.SlotMask
  12. Digests[] = array of DIGESTS.Digest
  13. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  14. CERTIFICATE <- Responder
  15. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], Param2=NoMeasurement, ...}
  16. SpdmMessage <- Responder

TestTeardown: None

Steps:

  1. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  2. DIGESTS <- Responder
  3. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], Param2=NoMeasurement, Nonce}
  4. SpdmMessage <- Responder

Assertion 6.13.1: sizeof(SpdmMessage) >= sizeof(CHALLENGE_AUTH) + SpdmMessage.OpaqueDataLength

Assertion 6.13.2: SpdmMessage.RequestResponseCode == CHALLENGE_AUTH

Assertion 6.13.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 6.13.4: (SpdmMessage.Param1.SlotID & 0xF) == SlotID

Assertion 6.13.5: (SpdmMessage.Param2.SlotMask & bit_[SlotID]) != 0

Assertion 6.13.6: SpdmMessage.CertChainHash == Hash(CertChain) SpdmMessage.CertChainHash == Digests[SlotID]

Assertion 6.13.7: SPDMsignatureVerify (PubKey, SpdmMessage.Signature, M1/M2) version 1.2 success.

  1. Repeat (1~4) and use CHALLENGE {Param2=TcbMeasurements}, if Flags.MEAS_CAP != 0.

Assertion 6.13.*.

  1. Repeat (1~4) and use CHALLENGE {Param2=AllMeasurement}, if Flags.MEAS_CAP != 0.

Assertion 6.13.*.

Case 6.14

Description: SPDM responder shall return valid CHALLENGE_AUTH, if it receives a CHALLENGE with negotiated version 1.2 in (A2, B4, C1).

SPDM Version: 1.2 only

TestSetup:

  1. Requester -> GET_VERSION {SPDMVersion=0x10}
  2. VERSION <- Responder
  3. If 1.2 is not in VERSION.VersionNumberEntry, then skip this case.
  4. Requester -> GET_CAPABILITIES {SPDMVersion=NegotiatedVersion, ...}
  5. CAPABILITIES <- Responder
  6. If Flags.CERT_CAP == 0 || Flags.CHAL_CAP == 0, then skip this case.
  7. Requester -> NEGOTIATE_ALGORITHMS {SPDMVersion=NegotiatedVersion, ...}
  8. ALGORITHMS <- Responder
  9. Requester -> GET_DIGESTS {SPDMVersion=NegotiatedVersion, ...}
  10. DIGESTS <- Responder
  11. ValidSlotID[] = array of bit-index that SlotMask[bit-index]=1 from DIGEST.Param2.SlotMask
  12. Digests[] = array of DIGESTS.Digest
  13. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  14. CERTIFICATE <- Responder
  15. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], Param2=NoMeasurement, ...}
  16. SpdmMessage <- Responder

TestTeardown: None

Steps:

  1. Requester -> GET_CERTIFICATE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], ...}
  2. CERTIFICATE <- Responder
  3. Requester -> CHALLENGE {SPDMVersion=NegotiatedVersion, Param1.SlotID=ValidSlotID[i], Param2=NoMeasurement, Nonce}
  4. SpdmMessage <- Responder

Assertion 6.14.1: sizeof(SpdmMessage) >= sizeof(CHALLENGE_AUTH) + SpdmMessage.OpaqueDataLength

Assertion 6.14.2: SpdmMessage.RequestResponseCode == CHALLENGE_AUTH

Assertion 6.14.3: SpdmMessage.SPDMVersion == NegotiatedVersion

Assertion 6.14.4: (SpdmMessage.Param1.SlotID & 0xF) == SlotID

Assertion 6.14.5: (SpdmMessage.Param2.SlotMask & bit_[SlotID]) != 0

Assertion 6.14.6: SpdmMessage.CertChainHash == Hash(CertChain) SpdmMessage.CertChainHash == Digests[SlotID]

Assertion 6.14.7: SPDMsignatureVerify (PubKey, SpdmMessage.Signature, M1/M2) version 1.2 success.

  1. Repeat (1~4) and use CHALLENGE {Param2=TcbMeasurements}, if Flags.MEAS_CAP != 0.

Assertion 6.14.*.

  1. Repeat (1~4) and use CHALLENGE {Param2=AllMeasurement}, if Flags.MEAS_CAP != 0.

Assertion 6.14.*.