185b528e0SShwetha/* Hey Emacs use -*- mode: C -*- */
285b528e0SShwetha/*
385b528e0SShwetha * Copyright (c) 2016 Cisco and/or its affiliates.
485b528e0SShwetha * Licensed under the Apache License, Version 2.0 (the "License");
585b528e0SShwetha * you may not use this file except in compliance with the License.
685b528e0SShwetha * You may obtain a copy of the License at:
785b528e0SShwetha *
885b528e0SShwetha *     http://www.apache.org/licenses/LICENSE-2.0
985b528e0SShwetha *
1085b528e0SShwetha * Unless required by applicable law or agreed to in writing, software
1185b528e0SShwetha * distributed under the License is distributed on an "AS IS" BASIS,
1285b528e0SShwetha * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1385b528e0SShwetha * See the License for the specific language governing permissions and
1485b528e0SShwetha * limitations under the License.
1585b528e0SShwetha */
1685b528e0SShwetha
179d420871SOle Troanoption version = "1.0.0";
1885b528e0SShwetha
1985b528e0SShwetha/** \brief Proof of Transit(POT): Set POT profile
2085b528e0SShwetha    @param id - id of the profile 
2185b528e0SShwetha    @param validator - True/False to indicate if this is verifier
2285b528e0SShwetha    @param secret_key - Verification key
2385b528e0SShwetha    @param secret_share - Share of the 1st polynomial
2485b528e0SShwetha    @param prime - Prime number used for modulo operation
2585b528e0SShwetha    @param max_bits - Max bits to be used for Random number generation
2685b528e0SShwetha    @param lpc - Lagrange basis polynomial
2785b528e0SShwetha    @param polynomial_public - pre-evaluated public polynomial 
2885b528e0SShwetha    @param list_name - name of this profile list
2985b528e0SShwetha*/
3011b8dbf7SDave Barachautoreply define pot_profile_add {
3185b528e0SShwetha  u32 client_index;
3285b528e0SShwetha  u32 context;
3385b528e0SShwetha  u8 id;
3485b528e0SShwetha  u8 validator;
3585b528e0SShwetha  u64 secret_key;
3685b528e0SShwetha  u64 secret_share;
3785b528e0SShwetha  u64 prime;
3885b528e0SShwetha  u8  max_bits;
3985b528e0SShwetha  u64 lpc;
4085b528e0SShwetha  u64 polynomial_public;
410fa66d61SOle Troan  string list_name[];
4285b528e0SShwetha};
4385b528e0SShwetha
4485b528e0SShwetha/** \brief Proof of Transit(POT): Activate POT profile in the list
4585b528e0SShwetha    @param id - id of the profile 
4685b528e0SShwetha    @param list_name - name of this profile list
4785b528e0SShwetha*/
4811b8dbf7SDave Barachautoreply define pot_profile_activate {
4985b528e0SShwetha  u32 client_index;
5085b528e0SShwetha  u32 context;
5185b528e0SShwetha  u8 id;
520fa66d61SOle Troan  string list_name[];
5385b528e0SShwetha};
5485b528e0SShwetha
5585b528e0SShwetha/** \brief Delete POT Profile 
5685b528e0SShwetha    @param client_index - opaque cookie to identify the sender
5785b528e0SShwetha    @param context - sender context, to match reply w/ request
5885b528e0SShwetha    @param list_name - name of profile list to delete
5985b528e0SShwetha*/
6011b8dbf7SDave Barachautoreply define pot_profile_del {
6185b528e0SShwetha  u32 client_index;
6285b528e0SShwetha  u32 context;
630fa66d61SOle Troan  string list_name[];
6485b528e0SShwetha};
6585b528e0SShwetha
66b4bc55b9SSagar Srivastav/** \brief Show POT Profiles
67b4bc55b9SSagar Srivastav    @param client_index - opaque cookie to identify the sender
68b4bc55b9SSagar Srivastav    @param context - sender context, to match reply w/ request
69b4bc55b9SSagar Srivastav    @param id - id of the profile
70b4bc55b9SSagar Srivastav*/
71b4bc55b9SSagar Srivastavdefine pot_profile_show_config_dump {
72b4bc55b9SSagar Srivastav  u32 client_index;
73b4bc55b9SSagar Srivastav  u32 context;
74b4bc55b9SSagar Srivastav  u8 id;
75b4bc55b9SSagar Srivastav};
76b4bc55b9SSagar Srivastav
77b4bc55b9SSagar Srivastav/** \brief Show POT profile reply
78b4bc55b9SSagar Srivastav    @param id - id of the profile
79b4bc55b9SSagar Srivastav    @param validator - True/False to indicate if this is verifier
80b4bc55b9SSagar Srivastav    @param secret_key - Verification key
81b4bc55b9SSagar Srivastav    @param secret_share - Share of the 1st polynomial
82b4bc55b9SSagar Srivastav    @param prime - Prime number used for modulo operation
83b4bc55b9SSagar Srivastav    @param max_bits - Max bits to be used for Random number generation
84b4bc55b9SSagar Srivastav    @param lpc - Lagrange basis polynomial
85b4bc55b9SSagar Srivastav    @param polynomial_public - pre-evaluated public polynomial
86b4bc55b9SSagar Srivastav    @param list_name_len - length of the name of this profile list
87b4bc55b9SSagar Srivastav    @param list_name - name of this profile list
88b4bc55b9SSagar Srivastav*/
89b4bc55b9SSagar Srivastavdefine pot_profile_show_config_details {
90b4bc55b9SSagar Srivastav  u32 context;
91b4bc55b9SSagar Srivastav  i32 retval;
92b4bc55b9SSagar Srivastav  u8 id;
93b4bc55b9SSagar Srivastav  u8 validator;
94b4bc55b9SSagar Srivastav  u64 secret_key;
95b4bc55b9SSagar Srivastav  u64 secret_share;
96b4bc55b9SSagar Srivastav  u64 prime;
97b4bc55b9SSagar Srivastav  u64 bit_mask;
98b4bc55b9SSagar Srivastav  u64 lpc;
99b4bc55b9SSagar Srivastav  u64 polynomial_public;
100b4bc55b9SSagar Srivastav};
101