blob: 7b614d8e261fd0d9444d9d9b29183abfa81f2252 [file] [edit]
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
edition = "2024";
package credentio;
import "cbor/tags.proto";
import "google/protobuf/struct.proto";
message SoftBindingMetadataMap {
// Additional description of the implementation or author of the binding or
// the algorithm
string description = 1;
// Contact information for the implementation or author of the binding or the
// algorithm
string contact = 2;
// A web page containing more details about the implementation or author of
// the binding or the algorithm.
string informational_url = 3 [(cbor.tags) = { name: "informationalUrl" }];
// Additional metadata of the soft binding.
// * tstr => any
}
message SoftBindingTimespanMap {
// Start of the time range (as milliseconds from media start)
int64 start = 1 [(cbor.tags) = { is_required: true, type: TYPE_UINT }];
// End of the time range (as milliseconds from media start)
int64 end = 2 [(cbor.tags) = { is_required: true, type: TYPE_UINT }];
}
message SoftBindingScopeMap {
// CBOR byte string describing, in algorithm specific format, the part of the
// digital content over which the soft binding value has been computed"
bytes extent = 1;
// The time range over which the soft binding value has been computed.
SoftBindingTimespanMap timespan = 2;
// The region of interest over which the soft binding value has been computed.
// RegionOfInterestMap region = 3;
}
message SoftBindingBlockMap {
SoftBindingScopeMap scope = 1 [(cbor.tags) = { is_required: true }];
// CBOR byte string describing, in algorithm specific format, the value of the
// soft binding computed over this block of digital content"
bytes value = 2 [(cbor.tags) = { is_required: true }];
}
// Schema for Soft Binding Assertion (c2pa.soft-binding)
// Matches C2PA 2.4 technical specification.
message SoftBindingAssertion {
// A string identifying the soft binding algorithm and version of that
// algorithm used to compute the value, taken from the C2PA soft binding
// algorithm list. If this field is absent, the algorithm is taken from the
// `alg_soft` value of the enclosing structure. If both are present, the field
// in this structure is used. If no value is present in any of these places,
// this structure is invalid; there is no default.
string algorithm = 1 [(cbor.tags) = { is_required: true, name: "alg" }];
repeated SoftBindingBlockMap blocks = 2
[(cbor.tags) = { is_required: true, disallow_empty: true }];
// For internal use in the manifest generator -- do not set or read.
bytes pad = 4 [(cbor.tags) = { mode: MODE_WRITE_ONLY }];
// For internal use in the manifest generator -- do not set or read.
bytes pad2 = 5 [(cbor.tags) = { mode: MODE_WRITE_ONLY }];
// A human-readable description of what this hash covers
string name = 6;
// CBOR byte string describing parameters of the soft binding algorithm.
bytes alg_params = 7 [(cbor.tags) = { name: "alg-params" }];
// Additional metadata of the soft binding. Useful for binding-specific
// information.
SoftBindingMetadataMap binding_metadata = 8
[(cbor.tags) = { name: "bindingMetadata" }];
// Additional information about the assertion
// AssertionMetadataMap assertion_metadata = 9
// [(cbor.tags) = { name: "metadata" }];
}