File: ck_structs.proto

package info (click to toggle)
chromium 138.0.7204.183-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,908 kB
  • sloc: cpp: 34,937,088; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (94 lines) | stat: -rw-r--r-- 2,598 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Copyright 2017 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package chaps;

// Proto for CK_MECHANISM_INFO.
// https://www.cryptsoft.com/pkcs11doc/v220/structCK__MECHANISM__INFO.html
message MechanismInfo {
  // Next ID to use: 4

  optional uint64 min_key_size = 1;
  optional uint64 max_key_size = 2;
  optional uint64 flags = 3;
}

// Proto for CK_SESSION_INFO.
// https://www.cryptsoft.com/pkcs11doc/v220/structCK__SESSION__INFO.html
message SessionInfo {
  // Next ID to use: 5

  optional uint64 slot_id = 1;
  optional uint64 state = 2;
  optional uint64 flags = 3;
  optional uint64 device_error = 4;
}

// Proto for CK_VERSION.
// https://www.cryptsoft.com/pkcs11doc/v220/structCK__VERSION.html
message Version {
  // Next ID to use: 3

  optional uint32 major = 1;
  optional uint32 minor = 2;
}

// Proto for CK_SLOT_INFO.
// https://www.cryptsoft.com/pkcs11doc/v220/structCK__SLOT__INFO.html
message SlotInfo {
  // Next ID to use: 6

  optional bytes slot_description = 1;
  optional bytes manufacturer_id = 2;
  optional uint64 flags = 3;
  optional Version hardware_version = 4;
  optional Version firmware_version = 5;
}

// Proto for CK_TOKEN_INFO.
// https://www.cryptsoft.com/pkcs11doc/v220/structCK__TOKEN__INFO.html
message TokenInfo {
  // Next ID to use: 18

  optional bytes label = 1;
  optional bytes manufacturer_id = 2;
  optional bytes model = 3;
  optional bytes serial_number = 4;
  optional uint64 flags = 5;
  optional uint64 max_session_count = 6;
  optional uint64 session_count = 7;
  optional uint64 max_session_count_rw = 8;
  optional uint64 session_count_rw = 9;
  optional uint64 max_pin_len = 10;
  optional uint64 min_pin_len = 11;
  optional uint64 total_public_memory = 12;
  optional uint64 free_public_memory = 13;
  optional uint64 total_private_memory = 14;
  optional uint64 free_private_memory = 15;
  optional Version hardware_version = 16;
  optional Version firmware_version = 17;
}

// Proto of CK_PRF_DATA_PARAM.
message PrfDataParam {
  // Next ID to use: 3

  optional uint64 type = 1;
  optional bytes value = 2;
}

// Proto for CK_SP800_108_KDF_PARAMS.
message Sp800108KdfParams {
  // Next ID to use: 3

  optional uint64 prf_type = 1;
  repeated PrfDataParam data_params = 2;
  // Current implementation doesn't support deriving additional keys, so we
  // don't contain field `additional_derived_keys` here since we expect
  // ulAdditionalDerivedKeys=0 and pAdditionalDerivedKeys=NULL_PTR
}