From c2c3feffc653ceef131e7e808c2dfe115d7c84b2 Mon Sep 17 00:00:00 2001 From: HarshvMahawar Date: Sat, 5 Apr 2025 04:57:06 +0530 Subject: [PATCH 1/2] Enhance README.md with detailed technical overview of the project Signed-off-by: HarshvMahawar --- README.md | 72 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 57 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 537468d..1407903 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,68 @@ -# python-ear +# **python-ear** -A python implementation of [draft-fv-rats-ear](https://datatracker.ietf.org/doc/draft-fv-rats-ear/). +A Python library that implements the EAT Attestation Result (EAR) data format, as specified in [draft-fv-rats-ear](https://datatracker.ietf.org/doc/draft-fv-rats-ear/). This library provides implementations for both CBOR-based and JSON-based serialisations. -# Proposal +--- -Following are the tools that will be used in the development of this library +## **Overview** -## CWT and JWT creation +The goal of this project is to standardize attestation results by defining a shared information and data model, enabling seamless integration with other components of the RATS architecture. This focuses specifically on harmonizing attestation results to facilitate interoperability between various verifiers and relying parties. -1. [python-cwt](https://python-cwt.readthedocs.io/en/stable/) -2. [python-jwt](https://pypi.org/project/python-jose/) +This implementation was initiated as part of the **Veraison Mentorship** under the Linux Foundation Mentorship Program (**LFX Mentorship**), focusing on the following capabilities: -## Code formatting and styling +- **Populating EAR Claims-Sets:** Define and populate claims that represent evidence and attestation results. +- **Signing EAR Claims-Sets:** Support signing using private keys, ensuring data integrity and authenticity. +- **Encoding and Decoding:** + - Encode signed EAR claims as **CWT** (Concise Binary Object Representation Web Tokens) or **JWT** (JSON Web Tokens). + - Decode signed EARs from CWT or JWT formats, enabling interoperability between different systems. +- **Signature Verification:** Verify signatures using public keys to ensure the authenticity of claims. +- **Accessing Claims:** Provide interfaces to access and manage EAR claims efficiently. -1. [black](https://pypi.org/project/black/) -2. [isort](https://pypi.org/project/isort/) +This library is developed in Python and makes use of existing packages for CWT and JWT management, static code analysis, and testing. -## Linting and static analysis +--- -1. [flake8](https://pypi.org/project/flake8/) -2. [mypy](https://pypi.org/project/mypy/) +## **Key Features** -## Testing +1. **Standards Compliance:** + Implements draft-fv-rats-ear as per IETF specifications to ensure compatibility with the RATS architecture. -1. [pytest](https://pypi.org/project/pytest/) \ No newline at end of file +2. **Token Management:** + - **CWT Support:** Utilizes [python-cwt](https://python-cwt.readthedocs.io/en/stable/) for handling CBOR Web Tokens. + - **JWT Support:** Uses [python-jose](https://pypi.org/project/python-jose/) for JSON Web Tokens management. + +3. **Security:** + - Supports signing of EAR claims with private keys and verification with public keys. + - Adopts secure cryptographic practices for token creation and verification. + +4. **Static Analysis and Code Quality:** + - Ensures code quality using linters and static analysis tools. + - Maintains type safety and code consistency. + +5. **Testing:** + - Comprehensive unit tests using `pytest` to validate all functionalities. + +--- + +## **Technical Stack** + +### **Token Creation and Management** + +- **CWT:** [python-cwt](https://python-cwt.readthedocs.io/en/stable/) +- **JWT:** [python-jose](https://pypi.org/project/python-jose/) + +### **Code Formatting and Styling** + +- **black:** Ensures consistent code formatting. +- **isort:** Manages import statements. + +### **Linting and Static Analysis** + +- **flake8:** For PEP 8 compliance and linting. +- **mypy:** Static type checking. +- **pyright:** Advanced type checking for Python. +- **pylint:** Code analysis for error detection and enforcing coding standards. + +### **Testing** + +- **pytest:** Framework for writing and executing tests. \ No newline at end of file From 957df7d036f741b7c9a49b2e5acbbcb4b568c7ba Mon Sep 17 00:00:00 2001 From: HarshvMahawar Date: Tue, 8 Apr 2025 00:46:31 +0530 Subject: [PATCH 2/2] Improve readability and correct resource links Signed-off-by: HarshvMahawar --- README.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1407903..05d5935 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,16 @@ -# **python-ear** +# python-ear -A Python library that implements the EAT Attestation Result (EAR) data format, as specified in [draft-fv-rats-ear](https://datatracker.ietf.org/doc/draft-fv-rats-ear/). This library provides implementations for both CBOR-based and JSON-based serialisations. +A Python library that implements the EAT Attestation Result (EAR) data format, as specified in [draft-ietf-rats-ear](https://datatracker.ietf.org/doc/draft-ietf-rats-ear/). + +This library provides implementations for both CBOR-based and JSON-based serialisations. --- -## **Overview** +## Overview + +The goal of this project is to standardize attestation results by defining a shared information and data model, enabling seamless integration with other components of the RATS architecture. -The goal of this project is to standardize attestation results by defining a shared information and data model, enabling seamless integration with other components of the RATS architecture. This focuses specifically on harmonizing attestation results to facilitate interoperability between various verifiers and relying parties. +This focuses specifically on harmonizing attestation results to facilitate interoperability between various verifiers and relying parties. This implementation was initiated as part of the **Veraison Mentorship** under the Linux Foundation Mentorship Program (**LFX Mentorship**), focusing on the following capabilities: @@ -22,10 +26,10 @@ This library is developed in Python and makes use of existing packages for CWT a --- -## **Key Features** +## Key Features 1. **Standards Compliance:** - Implements draft-fv-rats-ear as per IETF specifications to ensure compatibility with the RATS architecture. + Implements draft-ietf-rats-ear as per IETF specifications to ensure compatibility with the RATS architecture. 2. **Token Management:** - **CWT Support:** Utilizes [python-cwt](https://python-cwt.readthedocs.io/en/stable/) for handling CBOR Web Tokens. @@ -44,25 +48,25 @@ This library is developed in Python and makes use of existing packages for CWT a --- -## **Technical Stack** +## Technical Stack -### **Token Creation and Management** +### Token Creation and Management - **CWT:** [python-cwt](https://python-cwt.readthedocs.io/en/stable/) - **JWT:** [python-jose](https://pypi.org/project/python-jose/) -### **Code Formatting and Styling** +### Code Formatting and Styling - **black:** Ensures consistent code formatting. - **isort:** Manages import statements. -### **Linting and Static Analysis** +### Linting and Static Analysis - **flake8:** For PEP 8 compliance and linting. - **mypy:** Static type checking. - **pyright:** Advanced type checking for Python. - **pylint:** Code analysis for error detection and enforcing coding standards. -### **Testing** +### Testing - **pytest:** Framework for writing and executing tests. \ No newline at end of file