Changelog
This document provides a chronological list of notable changes for each version of EncypherAI.
2.8.1 (2025-01-03)
Fixed
- Fixed critical
IndentationErrorinunicode_metadata.pythat prevented test collection and metadata extraction - Fixed missing
custom_metadatain manifest and cbor_manifest formats during embedding - Fixed
custom_metadataextraction by implementing proper payload flattening for manifest formats - Enhanced metadata extraction robustness with improved BOM handling and variation selector filtering
- Fixed integration test collection issues with diagnostic artifacts
- Improved FILE_END metadata extraction with better trailing marker detection
Changed
- Split integration tests into separate success and tamper detection test suites for clearer test results
- Enhanced test coverage with comprehensive FILE_END embedding scenarios (32 test cases)
- Improved error handling and logging in metadata extraction pipeline
2.8.0 (08-27-2025)
Added
- New Embedding Targets: Added
FILE_ENDandFILE_END_ZWNBSPtoMetadataTargetand as string options ("file_end","file_end_zwnbsp"). FILE_END: Appends the variation selectors at the end of the text content.FILE_END_ZWNBSP: Appends a zero-width no-break space (U+FEFF) followed by the variation selectors at the end, improving robustness in pipelines that might trim trailing selectors.- Documentation and examples updated to reference these targets:
docs/package/api-reference/unicode_metadata.mddocs/package/api-reference/streaming-metadata-encoder.mddocs/package/streaming/handlers.mddocs/package/examples/advanced-usage.mddocs/package/examples/c2pa_text_demo.md
Changed
- Timestamp Optionality:
UnicodeMetadata.embed_metadata()now treatstimestampas optional across all formats (basic,manifest,cbor_manifest,c2pa). - C2PA Assertions: When no timestamp is provided, C2PA action assertions (e.g.,
c2pa.created,c2pa.watermarked) omit thewhenfield. Behavior remains unchanged when a valid timestamp is supplied.
Fixed
- Interop Import: Resolved import/name collision in
encypher.interop.c2paby dynamically loading the siblingc2pa.pywithinencypher/interop/c2pa/__init__.pyand re-exporting: encypher_manifest_to_c2pa_like_dictc2pa_like_dict_to_encypher_manifestget_c2pa_manifest_schema
Documentation
- Updated
README.mdto clarify that timestamps are recommended but optional and to show usage with/without a timestamp.
2.7.0 (07-08-2025)
Modified
- Changed the public API so that the metadata format uses the generic value "c2pa" instead of the older "c2pa_v2_2". The version of C2PA alignment is now tracked in the README.md.
metadata_formatnow expects:metadata_format: Literal["basic", "manifest", "cbor_manifest", "c2pa"] = "manifest"
2.6.0 (07-07-2025)
Added
- Metadata Redaction:
UnicodeMetadata.embed_metadataandStreamingHandlernow support anomit_keysparameter to remove specified metadata fields before signing. The CLI exposes this via--omit-keys.
2.5.0 (07-07-2025)
Added
- JUMBF Embedding: Added support for a
jumbfmetadata format which stores the inner payload in a compact binary JUMBF box. The decoder now automatically detects JSON, CBOR, or JUMBF embeddings.
2.4.0 (06-28-2025)
Added
- C2PA v2.2 Compliance: Re-architected the core package to be the reference implementation for text-based C2PA v2.2 soft binding. This includes:
- Manifest Structure: Manifests now conform to the C2PA v2.2 specification, including the official
@context, a uniqueinstance_id, and ISO 8601 formatted timestamps. - Hard Binding: Added the mandatory
c2pa.hash.data.v1assertion, which contains a SHA-256 hash of the clean text content for integrity verification. - Soft Binding: Implemented the
c2pa.soft_binding.v1assertion, formalizing our Unicode Variation Selector method asencypher.unicode_variation_selector.v1and linking it to ac2pa.watermarkedaction. - Advanced Signing: Integrated COSE (CBOR Object Signing and Encryption) for claims, with support for X.509 certificate validation and RFC 3161 Time-Stamp Authority (TSA) integration.
- Conditional Hard Binding Control:
- Introduced
add_hard_binding: booltoUnicodeMetadata.embed_metadatato optionally disable hard binding, which is now the default for streaming. - Added
require_hard_binding: booltoUnicodeMetadata.verify_metadatato allow verification of streamed content where hard binding is intentionally omitted. - New Internal APIs: Added
_embed_c2pa_compliantand_verify_c2pa_compliantmethods to encapsulate C2PA-specific logic, along with newTypedDictpayload structures for all C2PA assertions.
Changed
- Streaming Verification: The default behavior for streaming has been updated to disable hard binding. The
StreamingHandlernow implicitly callsembed_metadatawithadd_hard_binding=Falseto prevent false verification failures on partial content. - Claim Generator: The
claim_generatorfield is now dynamically populated with the current package version (e.g.,encypher-ai/2.4.0), removing the need for manual updates in future releases.
Fixed
- StreamingHandler Initialization: Fixed a bug in the
StreamingHandlerwhere custom claims and timestamps were not being correctly passed to the embedding function, causing errors during C2PA manifest creation. - StreamingHandler Metadata Embedding: Fixed a critical bug in the
StreamingHandlerwhere user-supplied metadata fields (especiallycustom_metadata) were not being correctly preserved in the embedded payload, causing metadata round-trip verification failures in integration tests. - Gemini Integration Test: Fully repaired the Gemini integration test to correctly verify both non-streaming (with hard binding) and streaming (without hard binding) metadata, confirming the end-to-end workflow.
- Core
UnicodeMetadataBugs: - Restored missing
_bytes_to_variation_selectorsand_extract_outer_payloadhelper methods, resolvingAttributeErrorexceptions. - Corrected a critical
IndentationErrorinunicode_metadata.py. - Type Checking: Fixed multiple mypy errors in the codebase:
- Added proper null checks for COSE message payloads
- Fixed RSA signature verification type handling
- Added proper type annotations for timestamp requests
- Added
types-requeststo development dependencies - Fixed string formatting of binary data
- Added explicit string conversion for certificate common names and serial numbers
Documentation
- Comprehensive Streaming Update: Overhauled all documentation (integration guides, README, user guides) to reflect the new
require_hard_binding=Falseparameter for verifying streamed content. - C2PA Specification: Added a formal algorithm specification document (
docs/c2pa_algorithm_spec.md) detailing the technical implementation for our C2PA submission.
2.3.0 (06-15-2025)
Added
- C2PA Interoperability:
- Introduced a new
cbor_manifestmetadata format for embedding full C2PA-compliant manifests serialized using CBOR. This provides a more compact and standards-aligned method for storing complex claim data. - Added
c2pa_like_dict_to_encypher_manifestandencypher_manifest_to_c2pa_like_dictconversion utilities inencypher.interop.c2pato seamlessly translate between Encypher's internal manifest structure and C2PA-like dictionaries. - Implemented conditional logic to handle both nested assertion data (for CBOR) and flattened data structures for standard JSON manifests.
- CBOR Support:
- Integrated the
cbor2library to enable CBOR serialization and deserialization. - Added helper functions for encoding/decoding CBOR payloads, including Base64 wrapping for text-based embedding.
- Documentation & Examples:
- Created a new example script
c2pa_text_embedding_demo.pydemonstrating the end-to-end flow of creating, embedding, and verifying a C2PA-like manifest. - Updated
c2pa-relationship.mdto detail the new CBOR-based manifest support and its benefits. - Testing:
- Added comprehensive integration tests for C2PA and CBOR manifest round-trips, ensuring data integrity and successful verification.
Fixed
- Documentation: Corrected all streaming verification examples across integration guides (
OpenAI,Anthropic,LiteLLM,FastAPI), theREADME.md, and user guides to userequire_hard_binding=False. This ensures documentation accurately reflects that hard binding is disabled for streamed content. - Type Hinting: Resolved all
mypystatic type checking errors inencypher.core.unicode_metadata, improving code reliability and maintainability. - Conversion Logic: Corrected conversion helpers to properly retain top-level
timestampandclaim_generatorfields during round-trip conversions.
Developer Changes
- Refactored
UnicodeMetadatato support multiple manifest formats (manifestandcbor_manifest) in both embedding and extraction workflows.
2.2.0 (06-02-2025)
Changed
- Core Package Refactoring:
- Split
crypto_utils.pyinto three specialized modules:keys.py: Key generation, loading, and saving functionspayloads.py: Payload data structures and serializationsigning.py: Digital signature operations
- Renamed functions for clarity:
load_private_key→load_private_key_from_dataload_public_key→load_public_key_from_data
- Added backward compatibility layer in
crypto_utils.pythat re-exports all functions and types with deprecation warnings
Added
- Documentation:
- Added a comprehensive Migration Guide to help users transition to the new module structure
- Updated example scripts to use the new module imports
Developer Changes
- Improved code organization following the Single Responsibility Principle
- Enhanced type hints and docstrings across all modules
- Added dedicated test file for signing functionality
- Ensured all tests pass with the new module structure
2.1.0 (05-23-2025)
Changed
- API Updates for
UnicodeMetadataclass:embed_metadata:- Now requires
signer_idas a direct parameter (replacingkey_idwithin ametadatadictionary). - Accepts other metadata components (
model_id,timestamp,organization,version,custom_metadata,metadata_format) as direct parameters. The genericmetadatadictionary parameter has been removed for clarity and type safety.
- Now requires
verify_metadata:- The
public_key_resolverparameter has been renamed topublic_key_providerfor consistency. - The
public_key_providerfunction now receivessigner_idas its argument. - Returns a tuple:
(is_valid: bool, signer_id: Optional[str], payload: Union[BasicPayload, ManifestPayload, None]).
- The
extract_metadata:- Now consistently returns a
BasicPayloadorManifestPayloadobject (orNone), rather than a raw dictionary.
- Now consistently returns a
- Consistent Terminology:
- Replaced all instances of
key_idwithsigner_idacross the API, internal logic, and documentation to better reflect its purpose.
- Replaced all instances of
StreamingHandlerUpdate:- The constructor (
__init__) now acceptssigner_idand other metadata components as direct parameters, similar toembed_metadata.
- The constructor (
Documentation
- Updated all relevant documentation files, including:
quickstart.mdbasic-usage.mduser-guide/extraction-verification.mduser-guide/metadata-encoding.mdapi-reference/unicode-metadata.md
- All examples revised to reflect the new API signatures, parameter changes, and the use of
signer_id. - Ensured all code examples are runnable and accurately demonstrate the functionalities of version 2.1.0.
2.0.0 (04-13-2025)
Added
- Ed25519 digital signatures for enhanced security
- Key management utilities for generating and managing key pairs
- Public key resolver pattern for verification
- Improved API for metadata embedding and verification
- Updated documentation with digital signature examples
- C2PA-inspired manifest structure for enhanced content provenance
- Interoperability module (
encypher.interop.c2pa) for conversion between EncypherAI and C2PA-like structures - Comprehensive documentation on C2PA relationship and alignment
Changed
- Replaced HMAC verification with Ed25519 digital signatures
- Updated
UnicodeMetadataclass to be the primary interface - Deprecated
MetadataEncoderandStreamingMetadataEncoderclasses - Improved
StreamingHandlerto use digital signatures - Updated all examples and integration guides
- Aligned manifest field names with C2PA terminology:
- Renamed
actionstoassertionsinManifestPayload - Renamed
actiontolabelinManifestAction - Renamed
ai_infotoai_assertioninManifestPayload - Updated documentation to reflect terminology changes
- Enhanced docstrings with references to C2PA concepts
Security
- Enhanced security with asymmetric cryptography
- Separate private keys for signing and public keys for verification
- Key ID system for managing multiple keys
- Improved tamper detection capabilities
Documentation
- Added new user guide: Relationship to C2PA Standards
- Updated examples to use the new field names
- Added code examples for the interoperability module
1.0.0 (03-22-2025)
Added
- Initial stable release of EncypherAI
- Core metadata encoding and decoding functionality
- HMAC verification for tamper detection
- Support for multiple embedding targets:
- Whitespace (default)
- Punctuation
- First letter of words
- Last letter of words
- All characters
- Streaming support for handling content from LLMs
- Integration with popular LLM providers:
- OpenAI
- Anthropic
- LiteLLM
- Comprehensive documentation and examples
- Interactive demos:
- Jupyter Notebook demo
- Streamlit web app
- FastAPI example application
- Python client library
- JavaScript client library
Security
- Secure HMAC verification using SHA-256
- Secret key management for verification
- Tamper detection capabilities