You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This post explores implementing Zero Knowledge (ZK) caveats in Biscuit tokens using cryptographic accumulators and witnesses from the BLS signature scheme, with caveat ranges predefined in the Sonr blockchain's x/did module parameters. This approach ensures standardized authorization constraints across the network.
Module Parameters
// x/did/types/params.gotypeParamsstruct {
// Predefined caveat ranges and constraintsCaveatRangesmap[string]CaveatRange`json:"caveat_ranges"`// Maximum number of ZK caveats per tokenMaxZKCaveatsuint32`json:"max_zk_caveats"`// Minimum accumulator sizeMinAccumulatorSizeuint32`json:"min_accumulator_size"`
}
typeCaveatRangestruct {
// Minimum value for numeric caveatsMinint64`json:"min"`// Maximum value for numeric caveatsMaxint64`json:"max"`// Allowed values for enumerated caveatsAllowedValues []string`json:"allowed_values,omitempty"`// Time-based caveat constraintsTimeConstraints*TimeRange`json:"time_constraints,omitempty"`
}
// Param setter in modulefunc (kKeeper) SetParams(ctx sdk.Context, paramsParams) {
k.paramStore.SetParamSet(ctx, ¶ms)
}
This implementation provides a standardized approach to ZK caveats in Biscuit authorization by leveraging the Sonr blockchain's x/did module parameters. This ensures consistent and governable authorization constraints across the entire network while maintaining privacy through zero knowledge proofs.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Overview
This post explores implementing Zero Knowledge (ZK) caveats in Biscuit tokens using cryptographic accumulators and witnesses from the BLS signature scheme, with caveat ranges predefined in the Sonr blockchain's x/did module parameters. This approach ensures standardized authorization constraints across the network.
Module Parameters
Core Components
ZK Accumulator with Module Parameters
Parameter-Aware Verifier
Integration with DID Module
Example Module Parameters
Example Usage with Module Parameters
Benefits
Implementation Details
Parameter Validation
Parameter Updates
Future Improvements
Security Considerations
This implementation provides a standardized approach to ZK caveats in Biscuit authorization by leveraging the Sonr blockchain's x/did module parameters. This ensures consistent and governable authorization constraints across the entire network while maintaining privacy through zero knowledge proofs.
For more implementation details, refer to the cryptographic primitives in the [onsonr/crypto](https://github.com/onsonr/crypto) repository and the DID module documentation.
Beta Was this translation helpful? Give feedback.
All reactions