val accessor'_signedDHParams_client_random:LL.accessor gaccessor'_signedDHParams_client_random
val accessor'_signedDHParams_client_random:LL.accessor gaccessor'_signedDHParams_client_random
let accessor'_signedDHParams_client_random : LL.accessor gaccessor'_signedDHParams_client_random = (LL.accessor_then_fst (LL.accessor_then_fst (LL.accessor_id signedDHParams'_parser)))
module MiTLS.Parsers.SignedDHParams

(* This file has been automatically generated by EverParse. *)
open FStar.Bytes
module U8 = FStar.UInt8
module U16 = FStar.UInt16
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module LP = LowParse.Spec
module LT = LowParse.TacLib
module LS = LowParse.SLow
module LSZ = LowParse.SLow
module LPI = LowParse.Spec.AllIntegers
module LL = LowParse.Low
module L = FStar.List.Tot
module B = LowStar.Buffer
module BY = FStar.Bytes
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST

#reset-options "--using_facts_from '* -FStar.Tactics -FStar.Reflection' --z3rlimit 16 --z3cliopt smt.arith.nl=false --max_fuel 2 --max_ifuel 2"

(* Type of field client_random*)
open MiTLS.Parsers.SignedDHParams_client_random

(* Type of field server_random*)
open MiTLS.Parsers.SignedDHParams_server_random

type signedDHParams' = ((signedDHParams_client_random & signedDHParams_server_random) & serverDHParams)

inline_for_extraction let synth_signedDHParams (x: signedDHParams') : signedDHParams =
  match x with ((client_random,server_random),params) -> {
    client_random = client_random;
    server_random = server_random;
    params = params;
  }

inline_for_extraction let synth_signedDHParams_recip (x: signedDHParams) : signedDHParams' = ((x.client_random,x.server_random),x.params)

let synth_signedDHParams_recip_inverse () : Lemma (LP.synth_inverse synth_signedDHParams_recip synth_signedDHParams) = ()

let synth_signedDHParams_injective () : Lemma (LP.synth_injective synth_signedDHParams) =
  LP.synth_inverse_synth_injective synth_signedDHParams_recip synth_signedDHParams;
  synth_signedDHParams_recip_inverse ()

let synth_signedDHParams_inverse () : Lemma (LP.synth_inverse synth_signedDHParams synth_signedDHParams_recip) =
  assert_norm (LP.synth_inverse synth_signedDHParams synth_signedDHParams_recip)

let synth_signedDHParams_recip_injective () : Lemma (LP.synth_injective synth_signedDHParams_recip) =
  synth_signedDHParams_recip_inverse ();
  LP.synth_inverse_synth_injective synth_signedDHParams synth_signedDHParams_recip

noextract let signedDHParams'_parser : LP.parser _ signedDHParams' = ((signedDHParams_client_random_parser `LP.nondep_then` signedDHParams_server_random_parser) `LP.nondep_then` serverDHParams_parser)

noextract let signedDHParams'_parser_kind = LP.get_parser_kind signedDHParams'_parser

let signedDHParams_parser =
  synth_signedDHParams_injective ();
  assert_norm (signedDHParams_parser_kind == signedDHParams'_parser_kind);
  signedDHParams'_parser `LP.parse_synth` synth_signedDHParams

noextract let signedDHParams'_serializer : LP.serializer signedDHParams'_parser = ((signedDHParams_client_random_serializer `LP.serialize_nondep_then` signedDHParams_server_random_serializer) `LP.serialize_nondep_then` serverDHParams_serializer)

let signedDHParams_serializer =
  [@inline_let] let _ = synth_signedDHParams_injective () in
  [@inline_let] let _ = synth_signedDHParams_inverse () in
  [@inline_let] let _ = assert_norm (signedDHParams_parser_kind == signedDHParams'_parser_kind) in
  LP.serialize_synth _ synth_signedDHParams signedDHParams'_serializer synth_signedDHParams_recip ()

let signedDHParams_bytesize (x:signedDHParams) : GTot nat = Seq.length (signedDHParams_serializer x)

let signedDHParams_bytesize_eq x = ()

inline_for_extraction let signedDHParams'_parser32 : LS.parser32 signedDHParams'_parser = ((signedDHParams_client_random_parser32 `LS.parse32_nondep_then` signedDHParams_server_random_parser32) `LS.parse32_nondep_then` serverDHParams_parser32)

let signedDHParams_parser32 =
  [@inline_let] let _ = synth_signedDHParams_injective () in
  [@inline_let] let _ = assert_norm (signedDHParams_parser_kind == signedDHParams'_parser_kind) in
  LS.parse32_synth _ synth_signedDHParams (fun x -> synth_signedDHParams x) signedDHParams'_parser32 ()

inline_for_extraction let signedDHParams'_serializer32 : LS.serializer32 signedDHParams'_serializer = ((signedDHParams_client_random_serializer32 `LS.serialize32_nondep_then` signedDHParams_server_random_serializer32) `LS.serialize32_nondep_then` serverDHParams_serializer32)

let signedDHParams_serializer32 =
  [@inline_let] let _ = synth_signedDHParams_injective () in
  [@inline_let] let _ = synth_signedDHParams_inverse () in
  [@inline_let] let _ = assert_norm (signedDHParams_parser_kind == signedDHParams'_parser_kind) in
  LS.serialize32_synth _ synth_signedDHParams _ signedDHParams'_serializer32 synth_signedDHParams_recip (fun x -> synth_signedDHParams_recip x) ()

inline_for_extraction let signedDHParams'_size32 : LSZ.size32 signedDHParams'_serializer = ((signedDHParams_client_random_size32 `LSZ.size32_nondep_then` signedDHParams_server_random_size32) `LSZ.size32_nondep_then` serverDHParams_size32)

let signedDHParams_size32 =
  [@inline_let] let _ = synth_signedDHParams_injective () in
  [@inline_let] let _ = synth_signedDHParams_inverse () in
  [@inline_let] let _ = assert_norm (signedDHParams_parser_kind == signedDHParams'_parser_kind) in
  LSZ.size32_synth _ synth_signedDHParams _ signedDHParams'_size32 synth_signedDHParams_recip (fun x -> synth_signedDHParams_recip x) ()

inline_for_extraction let signedDHParams'_validator : LL.validator signedDHParams'_parser = ((signedDHParams_client_random_validator `LL.validate_nondep_then` signedDHParams_server_random_validator) `LL.validate_nondep_then` serverDHParams_validator)

let signedDHParams_validator =
  [@inline_let] let _ = synth_signedDHParams_injective () in
  [@inline_let] let _ = assert_norm (signedDHParams_parser_kind == signedDHParams'_parser_kind) in
  LL.validate_synth signedDHParams'_validator synth_signedDHParams ()

inline_for_extraction let signedDHParams'_jumper : LL.jumper signedDHParams'_parser = ((signedDHParams_client_random_jumper `LL.jump_nondep_then` signedDHParams_server_random_jumper) `LL.jump_nondep_then` serverDHParams_jumper)

let signedDHParams_jumper =
  [@inline_let] let _ = synth_signedDHParams_injective () in
  [@inline_let] let _ = assert_norm (signedDHParams_parser_kind == signedDHParams'_parser_kind) in
  LL.jump_synth signedDHParams'_jumper synth_signedDHParams ()

let signedDHParams_bytesize_eqn x =
  [@inline_let] let _ = synth_signedDHParams_injective () in
  [@inline_let] let _ = synth_signedDHParams_inverse () in
  [@inline_let] let _ = assert_norm (signedDHParams_parser_kind == signedDHParams'_parser_kind) in
  LP.serialize_synth_eq _ synth_signedDHParams signedDHParams'_serializer synth_signedDHParams_recip () x;
LP.length_serialize_nondep_then signedDHParams_client_random_serializer signedDHParams_server_random_serializer x.client_random x.server_random;
LP.length_serialize_nondep_then (signedDHParams_client_random_serializer `LP.serialize_nondep_then` signedDHParams_server_random_serializer) serverDHParams_serializer (x.client_random, x.server_random) x.params;
  (signedDHParams_client_random_bytesize_eq (x.client_random));
  (signedDHParams_server_random_bytesize_eq (x.server_random));
  (serverDHParams_bytesize_eq (x.params));
  assert(signedDHParams_bytesize x == Seq.length (LP.serialize signedDHParams_client_random_serializer x.client_random) + Seq.length (LP.serialize signedDHParams_server_random_serializer x.server_random) + Seq.length (LP.serialize serverDHParams_serializer x.params))

let gaccessor'_signedDHParams_client_random : LL.gaccessor signedDHParams'_parser signedDHParams_client_random_parser _ = (LL.gaccessor_then_fst (LL.gaccessor_then_fst (LL.gaccessor_id signedDHParams'_parser)))

let gaccessor'_signedDHParams_server_random : LL.gaccessor signedDHParams'_parser signedDHParams_server_random_parser _ = (LL.gaccessor_then_snd (LL.gaccessor_then_fst (LL.gaccessor_id signedDHParams'_parser)))

let gaccessor'_signedDHParams_params : LL.gaccessor signedDHParams'_parser serverDHParams_parser _ = (LL.gaccessor_then_snd (LL.gaccessor_id signedDHParams'_parser))
/
prims.fst.checked MiTLS.Parsers.SignedDHParams_server_random.fsti.checked MiTLS.Parsers.SignedDHParams_client_random.fsti.checked LowStar.Buffer.fst.checked LowParse.TacLib.fst.checked LowParse.Spec.AllIntegers.fst.checked LowParse.Spec.fst.checked LowParse.SLow.fst.checked LowParse.Low.fst.checked FStar.UInt8.fsti.checked FStar.UInt64.fsti.checked FStar.UInt32.fsti.checked FStar.UInt16.fsti.checked FStar.Seq.fst.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.List.Tot.fst.checked FStar.HyperStack.ST.fsti.checked FStar.HyperStack.fst.checked FStar.Bytes.fsti.checked
MiTLS.Parsers.SignedDHParams.fst
LowParse.Low.Base.accessor MiTLS.Parsers.SignedDHParams.gaccessor'_signedDHParams_client_random
LowParse.Low.Combinators.accessor_then_fst LowParse.Spec.Combinators.and_then_kind MiTLS.Parsers.SignedDHParams_client_random.signedDHParams_client_random_parser_kind MiTLS.Parsers.SignedDHParams_server_random.signedDHParams_server_random_parser_kind MiTLS.Parsers.ServerDHParams.serverDHParams_parser_kind MiTLS.Parsers.SignedDHParams.signedDHParams' MiTLS.Parsers.SignedDHParams.signedDHParams'_parser MiTLS.Parsers.SignedDHParams_client_random.signedDHParams_client_random MiTLS.Parsers.SignedDHParams_client_random.signedDHParams_client_random_parser MiTLS.Parsers.SignedDHParams_server_random.signedDHParams_server_random MiTLS.Parsers.SignedDHParams_server_random.signedDHParams_server_random_parser LowParse.Low.Base.Spec.clens_compose FStar.Pervasives.Native.tuple2 MiTLS.Parsers.ServerDHParams.serverDHParams LowParse.Low.Base.Spec.clens_id LowParse.Low.Combinators.clens_fst LowParse.Low.Combinators.gaccessor_then_fst LowParse.Spec.Combinators.nondep_then MiTLS.Parsers.ServerDHParams.serverDHParams_parser LowParse.Low.Base.Spec.gaccessor_id LowParse.Low.Base.accessor_id
let accessor'_signedDHParams_client_random:LL.accessor gaccessor'_signedDHParams_client_random =
  
(LL.accessor_then_fst (LL.accessor_then_fst (LL.accessor_id signedDHParams'_parser)))