Skip to content

feat: Add support of signature verification for attestation records in decryptAttestation record command#98

Merged
Sashwat-K merged 8 commits intoibm-hyper-protect:mainfrom
vikas-sharma24:signatureVerification
Mar 10, 2026
Merged

feat: Add support of signature verification for attestation records in decryptAttestation record command#98
Sashwat-K merged 8 commits intoibm-hyper-protect:mainfrom
vikas-sharma24:signatureVerification

Conversation

@vikas-sharma24
Copy link
Collaborator

@vikas-sharma24 vikas-sharma24 commented Mar 9, 2026

Description

Brief description of the changes

Related Issue

Fixes #issue_number

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Code refactor

Testing

vikassharma@Vikass-MacBook-Pro contract-cli % ./contract-cli decrypt-attestation --in se-checksums.txt.enc --priv private-key.pem --signature se-signature.bin --attestation-cert attestation.crt
Signature verification successful - attestation records are valid and signed by IBM

26.2.0
Machine Type/Plant/Serial: xxxxx
Image age: xx days since creation.
Encryption Certificate valid until: xxxxx
Attestation Certificate valid until: xxxxx
xxxxx certificate_expiry_date.json
xxxxx root.tar.gz
xxxxx baseimage
xxxxx sbom
xxxxx /dev/disk/by-label/cidata
xxxxx cidata/meta-data
xxxxx cidata/user-data
xxxxx cidata/vendor-data
xxxxx contract:env 
xxxxx contract:attestationPublicKey 
xxxxx contract:workload
vikassharma@Vikass-MacBook-Pro contract-cli % ./contract-cli decrypt-attestation --help 
Usage:
  contract-cli decrypt-attestation [flags]

Mandatory Flags:
  --in                Path to encrypted attestation file (se-checksums.txt.enc, use '-' for standard input)
  --priv              Path to private key file for signing

Optional Flags:
  --attestation-cert  Path to IBM attestation certificate file (PEM format)
  --help              help for decrypt-attestation
  --out               Path to save decrypted attestation records
  --signature         Path to signature file (se-signature.bin)
vikassharma@Vikass-MacBook-Pro contract-cli % ./contract-cli decrypt-attestation --in se-checksums.txt.enc --priv private-key.pem --signature se-signature.bin                                                              
Error: --signature and --attestation-cert flags must be used together. Both are required or both should be omitted.

Usage:
  contract-cli decrypt-attestation [flags]

Flags:
      --attestation-cert string   Path to IBM attestation certificate file (PEM format)
  -h, --help                      help for decrypt-attestation
      --in string                 Path to encrypted attestation file (se-checksums.txt.enc, use '-' for standard input)
      --out string                Path to save decrypted attestation records
      --priv string               Path to private key file for signing
      --signature string          Path to signature file (se-signature.bin)

Checklist

  • My code follows the project's coding standards
  • I have performed a self-review of my code
  • I have commented my code where necessary
  • I have updated the documentation
  • I have added tests that prove my fix/feature works
  • All new and existing tests pass

Copy link
Collaborator

@Sashwat-K Sashwat-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Add example in docs/README.md
  • Use log.Fatal() for error statements

@vikas-sharma24
Copy link
Collaborator Author

@Sashwat-K updated decrypt-attestation doc with updated examples.

Copy link
Collaborator

@Sashwat-K Sashwat-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thank you @vikas-sharma24 for this feature!

@Sashwat-K Sashwat-K merged commit 57fc8fc into ibm-hyper-protect:main Mar 10, 2026
4 checks passed
@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.20.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants