// Copyright 2021 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto3";

option optimize_for = LITE_RUNTIME;

package chromeos.cdm;

// Used by the cdm-oemcrypto daemon to store the output from OEMCrypto
// DecryptCENC operations that originate in ARC that will then be routed for
// protected content decoding in Chrome.
message ArcSecureBufferForChrome {
  enum EncryptionScheme {
    NONE = 0;
    CENC = 1;
    CBCS = 2;
  }
  message EncryptionPattern {
    uint32 clear_bytes = 1;
    uint32 cypher_bytes = 2;
  }
  message Subsample {
    uint32 clear_bytes = 1;
    uint32 cypher_bytes = 2;
  }

  EncryptionScheme encryption_scheme = 1;
  bytes key_id = 2;
  bytes iv = 3;
  EncryptionPattern pattern = 4;
  repeated Subsample subsample = 5;
}
