Giter VIP home page Giter VIP logo

opentdf / spec Goto Github PK

View Code? Open in Web Editor NEW
16.0 23.0 6.0 1.79 MB

Trusted Data Format (TDF) is an Open, Interoperable, JSON encoded data format for implementing Data Centric Security for objects (such as files or emails) in zero-trust security world. This repository specifies the protocols and schemas required for TDF operation.

License: BSD 3-Clause Clear License

HTML 100.00%
data-encryption data-tagging drm end-to-end-encryption file-encryption open-source opensource tdf zero-trust zero-trust-security

spec's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spec's Issues

double encoded signatures `hex` + `base64`

In the current opentdf implementations for c++ and javascript it seems like we are double encoding the signatures. The spec for the root signature and policy binding it only mentions base64 wrapped hmac signature.

rootSignature.sig String The signature for the entire payload. \n\nExample of signature generation:\nBase64.encode(HMAC(BinaryOfAllHashesCombined, payloadKey))
policyBinding Object This contains a keyed hash that will provide cryptographic integrity on the policy object, such that it cannot be modified or copied to another TDF, without invalidating the binding. Specifically, you would have to have access to the key in order to overwrite the policy.This is Base64 encoding of HMAC(POLICY,KEY)

In my opinion the spec either needs to be updated or those clients need to adhere to what the spec says.

difference between `zip` and `zipstream` payload protocol

I am a little confused around what the difference is between zip and zipstream. Do we have any relevant material on the difference or an example of how to implement each? Is this talking about stream ciphers vs block ciphers?

Also does this drive the encryptionInformation.method.isStreamable bool?

segment hash clarification & issue

This is another spot where we seem to be double encoding with hex and base64 but the spec and the actual current implementations don't currently align again.

It seems that we are just extracting the gcm authentication tag off the cipher text then hex and base64 encoding it. Is this because its already a mac or should we be actually generating a sha256 hash from it?

I guess either way this needs some discussion as this is another place that we need to either update the implementations or the spec.

"EncryptionInformation.Method.IV" seems to have no use

Today in the current implementations it seems like the EncryptionInformation.Method.IV goes unused which leaves me to think it is not needed in EncryptionInformation.Method. I propose that we remove this field as it is standard practice to generate a random IV for each encrypted chunk and prepend it to the beginning of the cipher text.

Also this will help reduce any confusion if someone is trying to implement the tdf3 spec in something other than cpp or javascript

key access object encrypted metadata out of sync with implementation

When trying to add encrypted metadata into the new golang client I came across issues posting freeform metadata to kas like the spec says is possible.

Metadata associated with the TDF, and the request. The contents of the metadata are freeform, and are used to pass information from the client, and any plugins that may be in use by the KAS. The metadata stored here should not be used for primary access decisions

type Metadata struct {
	Algorithm  string `json:"algorithm"`
	IV         []byte `json:"iv"`
	CipherText []byte `json:"ciphertext"`
}

But it seems like now there is some structure around this metadata digging through the kas code. https://github.com/opentdf/backend/blob/main/containers/kas/kas_core/tdf3_kas_core/models/key_access/key_access_helpers_test.py#L171-L174

I feel like this is something that should be added to the spec because otherwise its another place that could make clients incompatible when building an implementation from the spec.

KAS RSA keys should be deprecated in favor of EC keys in the spec

  1. Right now, TDF uses an RSA keypair for wrapping.

  2. EC is smaller, faster, and more secure than RSA - TDF should use EC keys, there is no good reason not to.

  3. This would reduce the number of "important keys" in the system that people (and our scripts, and KAS, and hardware modules) have to keep track of.

  4. The biggest practical implementation difference between nanoTDF (which has no public spec) and TDF is the use of EC vs RSA keys - removing this would allow us to simplify our SDK logic, and share more code between the nanoTDF and TDF codepaths, as well as our KAS codepaths.

  5. This would require us to major-version bump the spec, add EC keys, and mark the use of RSA as deprecated - we should not be afraid of doing this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.