Releases: Cyphrme/Coz
Releases · Cyphrme/Coz
Coz v1.0.0-RC1
What's Changed
- Renamed to avoid naming conflict with Byte Dance's AI.
- feat: begin workstream to migrate to v2 changes by @nrdxp in #31
coze -> coz (package name, struct name, file extension, everything)
iat -> now
kid -> tag
x -> pub
d -> prv
msg -> standard field
dig -> standard field
Default update `now` in `pay` on sign
`now` 2^53 – 1 error on exception
Self-describing, non-JSON serialized digests, especially `tmb`s: ES256:cLj8vsYtMBwYkzoFVZHBZo6SNL8wSdCIjCKAwXNuhOk
Revoke must interpret size set at max 2048 bytes
Explicitly add in Spec Alg section: Coz assumes `pub` can be deterministically derived from `prv` for all supported algorithms.
Full Changelog: v0.0.9...v1.0.0
B64s
B64s is useful for B64 map keys. Idiomatically, map key type should be B64, but currently in Go map keys are only type string, not []byte. Since B64's underlying type is []byte it cannot be used as a map key. See golang/go#283 and google/go-cmp#67. B64s will be deprecated if/when Go supports []byte keys.
This is an acceptable hack because (from https://go.dev/blog/strings)
>[A] string holds arbitrary bytes. It is not required to hold Unicode text, > UTF-8 text, or any other predefined format. As far as the content of a > string is concerned, it is exactly equivalent to a slice of bytes.
Also, it's important that this package exports this type, because Coze requires canonical base64, which type B64s enforces. If packages were to implement this on their own, they may forget to have this enforcement.
v0.0.8
v0.0.7
Migrate from concurrency unsafe MapSlice to concurrency safe OrderedMap.
Other minor changes:
- Consistently name hash alg related variables to "hsh" to conform to three letter
sigandenc. Hash functions are still named "hash". - Formally require in in the spec that Coze errors on duplicates. For the Go implementation this applies to structures Pay, Coze, Key, and OrderedMap.
- ErrJSONDuplicate is now a type instead of a (constant) variable.
Alpha Coze
Coze v0.0.1 Release Notes
Major changes
- Added
algEd25519- Like ECDSA, in CozeEd25519only ever signs digests,
not unhashed messages. Ed25519's digest forcadis SHA-512.- Waiting on Go for
Ed25519phsupport.
- Waiting on Go for
- Coze now uses base64 and not Hex.
- Defined Coze Standard and Coze Core. - Coze Core is the minimal spec for Coze.
- Coze Standard is additional useful functions, but not essential for Core
Coze.
- Coze Standard is additional useful functions, but not essential for Core
- Normal (In Coze Standard and not Coze Core) - Normal is allowed to be
variadic. Normal is the generalization of Canon.- The following are valid Normals: [Canon, Only, Option, Need, Extra]
- For Go, using Generics where it makes sense.
- ECDSA x and y have been consolidated to x. - All serialize all private
components are ind, and all public components are inx. paytakes the place ofheadpayno longer needs to be UTF-8 sorted and fields can appear in any order. -
cadis still the hash over the compactified JSON representation.- Specific applications can still require specific order of fields.
cozefields, exceptsig, are all "meta" fields.coze.canis no longer an input variable for creating a canonical pay, but
rather is only used to describe the existing canon of pay.
- Moved 'alg.go' to package
coze, movedcryptokeyto its own package, and
removedcoze's dependency oncryptokey. - All
payfields are optional. An emptypayis valid. - Removed redundant tests.
- Various bug fixes.
- Go Coze changes "Cy" struct to "Coze", removed the JSON encapsulator. Added an
example to show Coze embedded in another struct. - Explicitly disallow duplicate JSON field names in Coze.
- Change rvk rules where revoke is denoted by a valid integer value other than
0.
Additional Explicit design decisions:
- Coze follows the underlying algorithm's standard or explicit endianness.
ECDSA is big endian and EdDSA is little endian.