Longfellow ZK 0290cb32
Loading...
Searching...
No Matches
flatsha256_witness.h
1// Copyright 2025 Google LLC.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef PRIVACY_PROOFS_ZK_LIB_CIRCUITS_SHA_FLATSHA256_WITNESS_H_
16#define PRIVACY_PROOFS_ZK_LIB_CIRCUITS_SHA_FLATSHA256_WITNESS_H_
17
18#include <stddef.h>
19#include <stdint.h>
20
21namespace proofs {
22
23uint32_t SHA256_ru32be(const uint8_t *d);
24
26 public:
27 struct BlockWitness {
28 uint32_t outw[48];
29 uint32_t oute[64];
30 uint32_t outa[64];
31 uint32_t h1[8];
32 };
33
34 static void transform_and_witness_block(const uint32_t in[16],
35 const uint32_t H0[8],
36 uint32_t outw[48], uint32_t oute[64],
37 uint32_t outa[64], uint32_t H1[8]);
38
39 static void transform_and_witness_message(size_t n, const uint8_t msg[/*n*/],
40 size_t max, uint8_t &numb,
41 uint8_t in[/* 64*max */],
42 BlockWitness bw[/*max*/]);
43};
44
45} // namespace proofs
46
47#endif // PRIVACY_PROOFS_ZK_LIB_CIRCUITS_SHA_FLATSHA256_WITNESS_H_
Definition flatsha256_witness.h:25
Definition flatsha256_witness.h:27