Calculate expected measurement of an AMD SEV-SNP guest VM for confidential computing
Project description
sev-snp-measure
Scope
Calculate expected measurement of an AMD SEV-SNP guest VM for confidential computing.
Installation
From pip
Install from pip:
pip install sev-snp-measure
This installs the sevsnpmeasure
package and a sev-snp-measure command-line
script.
From Github
Clone the Github repo and run the script directly from the local directory:
git clone https://github.com/IBM/sev-snp-measure.git
cd sev-snp-measure
./sev-snp-measure.py --help
Command-line usage
$ sev-snp-measure --help
usage: sev-snp-measure [-h] --vcpus VCPUS --ovmf OVMF [--kernel KERNEL] [--initrd INITRD] [--append APPEND]
Calculate AMD SEV-SNP launch measurement
optional arguments:
-h, --help show this help message and exit
--vcpus VCPUS Number of vcpus
--ovmf OVMF OVMF file to calculate hash from
--kernel KERNEL Kernel file to calculate hash from
--initrd INITRD Initrd file to calculate hash from (use with --kernel)
--append APPEND Kernel command line to calculate hash from (use with --kernel)
For example:
sev-snp-measure --vcpus=1 --ovmf=OVMF.fd --kernel=vmlinuz --initrd=initrd.img --append="console=ttyS0 loglevel=7"
Programmatic usage
After installing the sev-snp-measure
package with pip, you can call it from
another Python application:
from sevsnpmeasure import guest
ld = guest.calc_launch_digest(vcpus_num, ovmf_path, kernel_path, initrd_path, cmdline_str)
print("Calculated measurement:", ld.hex())
Notes
If you have any questions or issues you can create a new issue here
Pull requests are welcome!
License
Apache 2.0 license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sev-snp-measure-0.0.2.tar.gz
.
File metadata
- Download URL: sev-snp-measure-0.0.2.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f0e0473c140fdc562dbc65e4b880b447a3cd287573fdad2b3c79692d8cd0823 |
|
MD5 | 0484f40769e186fd362905ce195fcb38 |
|
BLAKE2b-256 | 8afc2e17159b93cf59bceddf370aec6c939f1d001f9ec9ca712c118af23497ae |
File details
Details for the file sev_snp_measure-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: sev_snp_measure-0.0.2-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aedc5118beee55a6b67b54dc4d9bf28de5146a63ac1be93505403d92ae5a054 |
|
MD5 | 03f4a09284cf9233dfd6e1ced4b91e76 |
|
BLAKE2b-256 | e07dd67c7c48ee8b9a0aa01ac09cdb22c66f21ca8493bde0cd9fbff431f2ae9e |