This commit is contained in:
Amaury Chamayou 2019-04-26 16:27:27 +01:00
Родитель b274208297
Коммит b05da63d5c
1229 изменённых файлов: 250258 добавлений и 330 удалений

110
.clang-format Normal file
Просмотреть файл

@ -0,0 +1,110 @@
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: AfterColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
ForEachMacros:
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: true
IndentPPDirectives: AfterHash
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 600
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 2
UseTab: Never
...

346
.gitignore поставляемый
Просмотреть файл

@ -1,330 +1,18 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
build*/
_build/
Debug*/
Release*/
CMakeFiles/
.vscode/
libuv/
raft_tests.md
tests/raft_scenarios
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
sphinx/build/
tests/Testing/
doxygen/
obj/
*.retry
tests/env/
getting_started/create_vm/generated
sphinx/env/

28
.vsts-ci-san-and-doc.yml Normal file
Просмотреть файл

@ -0,0 +1,28 @@
trigger:
branches:
include:
- "master"
jobs:
- job: build_and_publish_docs
pool: Ubuntu-1804-SGX-Azure
steps:
- checkout: self
clean: true
submodules: true
- script: doxygen
displayName: Doxgen
- script: |
python3.7 -m venv env
source env/bin/activate
pip install -U -r requirements.txt
make html
displayName: Sphinx
workingDirectory: sphinx
- job: ACC_SAN_build
pool: Ubuntu-1804-SGX-Azure
steps:
- template: .vsts-ci-templates/build_and_test_with_san.yml

Просмотреть файл

@ -0,0 +1,38 @@
steps:
- checkout: self
clean: true
submodules: true
- task: CMake@1
displayName: CMake
inputs:
cmakeArgs: '-GNinja ..'
- script: ninja
displayName: Ninja
workingDirectory: build
- script: |
python3.7 -m venv env
source env/bin/activate
pip install -U -r ../tests/requirements.txt
ctest -VV --timeout 240 --no-compress-output -T Test
displayName: CTest
workingDirectory: build
- script: 'xsltproc --stringparam suiteName "$(Agent.MachineName)" ../tests/infra/ctest_to_junit.xslt Testing/*/Test.xml > JUnit.xml'
displayName: XSLT
workingDirectory: build
condition: succeededOrFailed()
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/JUnit.xml'
publishRunAttachments: true
condition: succeededOrFailed()
- script: |
ls *_test | xargs -n1 -I '{}' llvm-profdata-7 merge {}.profraw -o {}.profdata
ls *_test | xargs -n1 -I '{}' sh -c 'printf "\n*** Binary: {} ***\n "; llvm-cov-7 report -object {} -instr-profile {}.profdata -ignore-filename-regex="(boost|openenclave|3rdparty|/test/)"'
displayName: Coverage
workingDirectory: build

Просмотреть файл

@ -0,0 +1,23 @@
steps:
- checkout: self
clean: true
submodules: true
- task: CMake@1
displayName: CMake
inputs:
cmakeArgs: '-GNinja -DPBFT=ON ..'
- script: ninja
displayName: Ninja
workingDirectory: build
# TODO(#pbft): When pbft works with real enclave and dynamically supports
# more than 2 nodes, TEST_ENCLAVE=virtual and -R end_to_end_logging should be removed
- script: |
python3.7 -m venv env
source env/bin/activate
pip install -U -r ../tests/requirements.txt
TEST_ENCLAVE=virtual ctest -VV -R end_to_end_logging --timeout 240 --no-compress-output -T Test
displayName: CTest
workingDirectory: build

Просмотреть файл

@ -0,0 +1,49 @@
steps:
- checkout: self
clean: true
submodules: true
- task: CMake@1
displayName: CMake
inputs:
cmakeArgs: '-GNinja -DSAN=ON -DEXTENSIVE_TESTS=ON ..'
- script: ninja
displayName: Ninja
workingDirectory: build
- script: |
python3.7 -m venv env
source env/bin/activate
pip install -U -r ../tests/requirements.txt
ctest -VV --timeout 240 --no-compress-output -T Test
displayName: CTest
workingDirectory: build
- script: 'xsltproc --stringparam suiteName "$(Agent.MachineName)" ../tests/infra/ctest_to_junit.xslt Testing/*/Test.xml > JUnit_enclave.xml'
displayName: XSLT
workingDirectory: build
condition: succeededOrFailed()
- script: |
source env/bin/activate
TEST_ENCLAVE=virtual ctest -VV -R client_test --timeout 240 --no-compress-output -T Test
displayName: CTest
workingDirectory: build
- script: 'xsltproc --stringparam suiteName "$(Agent.MachineName) Virtual" ../tests/infra/ctest_to_junit.xslt Testing/*/Test.xml > JUnit_virtual.xml'
displayName: XSLT
workingDirectory: build
condition: succeededOrFailed()
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/JUnit_*.xml'
publishRunAttachments: true
condition: succeededOrFailed()
- script: |
ls *_test | xargs -n1 -I '{}' llvm-profdata-7 merge {}.profraw -o {}.profdata
ls *_test | xargs -n1 -I '{}' sh -c 'printf "\n*** Binary: {} ***\n "; llvm-cov-7 report -object {} -instr-profile {}.profdata -ignore-filename-regex="(boost|openenclave|3rdparty|/test/)"'
displayName: Coverage
workingDirectory: build

41
.vsts-ci.yml Normal file
Просмотреть файл

@ -0,0 +1,41 @@
trigger:
branches:
include:
- "*"
jobs:
- job: ACC_1804_build
pool: Ubuntu-1804-SGX-Azure
steps:
- template: .vsts-ci-templates/build_and_test.yml
- job: ACC_1804_build_pbft
pool: Ubuntu-1804-SGX-Azure
steps:
- template: .vsts-ci-templates/build_and_test_with_pbft.yml
- job: static_checks
pool: Ubuntu-1804-SGX-Azure
steps:
- checkout: self
clean: true
submodules: true
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
- script: find . -regex ".*\.sh$" | xargs shellcheck -s bash -e SC2044,SC2002
displayName: 'Shell Check'
- script: python3.7 notice-check.py
displayName: 'Check copyright notices'
- script: ./check-format.sh
displayName: 'Check C++ code format'
- script: |
python3.7 -m venv env
source env/bin/activate
pip install black
black --check sphinx/ tests/ notice-check.py
displayName: 'Check Python code format'

4641
3rdparty/CLI11/CLI11.hpp поставляемый Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

6000
3rdparty/doctest/doctest.h поставляемый Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

1874
3rdparty/evercrypt/EverCrypt.c поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

341
3rdparty/evercrypt/EverCrypt.h поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

97
3rdparty/evercrypt/EverCrypt_AutoConfig2.c поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

46
3rdparty/evercrypt/EverCrypt_AutoConfig2.h поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

84
3rdparty/evercrypt/EverCrypt_Hacl.h поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

1028
3rdparty/evercrypt/EverCrypt_Hash.c поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

159
3rdparty/evercrypt/EverCrypt_Hash.h поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

13
3rdparty/evercrypt/EverCrypt_Kremlib.c поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

24
3rdparty/evercrypt/EverCrypt_Kremlib.h поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

45
3rdparty/evercrypt/EverCrypt_Misc.h поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

111
3rdparty/evercrypt/Hacl.h поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

22
3rdparty/evercrypt/Vale.h поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

279
3rdparty/evercrypt/aes-x86_64-darwin.S поставляемый Normal file
Просмотреть файл

@ -0,0 +1,279 @@
.text
.global _KeyExpansionStdcall
_KeyExpansionStdcall:
movdqu 0 (%rdi), %xmm1
mov %rsi, %rdx
movdqu %xmm1, 0 (%rdx)
aeskeygenassist $1, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 16 (%rdx)
aeskeygenassist $2, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 32 (%rdx)
aeskeygenassist $4, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 48 (%rdx)
aeskeygenassist $8, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 64 (%rdx)
aeskeygenassist $16, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 80 (%rdx)
aeskeygenassist $32, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 96 (%rdx)
aeskeygenassist $64, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 112 (%rdx)
aeskeygenassist $128, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 128 (%rdx)
aeskeygenassist $27, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 144 (%rdx)
aeskeygenassist $54, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 160 (%rdx)
pxor %xmm1, %xmm1
pxor %xmm2, %xmm2
pxor %xmm3, %xmm3
ret
.global _KeyExpansionAndInversionStdcall
_KeyExpansionAndInversionStdcall:
movdqu 0 (%rdi), %xmm1
mov %rsi, %rdx
movdqu %xmm1, 0 (%rdx)
aeskeygenassist $1, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 16 (%rdx)
aeskeygenassist $2, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 32 (%rdx)
aeskeygenassist $4, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 48 (%rdx)
aeskeygenassist $8, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 64 (%rdx)
aeskeygenassist $16, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 80 (%rdx)
aeskeygenassist $32, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 96 (%rdx)
aeskeygenassist $64, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 112 (%rdx)
aeskeygenassist $128, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 128 (%rdx)
aeskeygenassist $27, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 144 (%rdx)
aeskeygenassist $54, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 160 (%rdx)
movdqu 16 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 16 (%rdx)
movdqu 32 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 32 (%rdx)
movdqu 48 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 48 (%rdx)
movdqu 64 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 64 (%rdx)
movdqu 80 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 80 (%rdx)
movdqu 96 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 96 (%rdx)
movdqu 112 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 112 (%rdx)
movdqu 128 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 128 (%rdx)
movdqu 144 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 144 (%rdx)
pxor %xmm1, %xmm1
pxor %xmm2, %xmm2
pxor %xmm3, %xmm3
ret
.global _AES128EncryptOneBlockStdcall
_AES128EncryptOneBlockStdcall:
movdqu 0 (%rsi), %xmm0
mov %rdx, %r8
movdqu 0 (%r8), %xmm2
pxor %xmm2, %xmm0
movdqu 16 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 32 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 48 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 64 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 80 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 96 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 112 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 128 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 144 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 160 (%r8), %xmm2
aesenclast %xmm2, %xmm0
pxor %xmm2, %xmm2
movdqu %xmm0, 0 (%rdi)
ret

279
3rdparty/evercrypt/aes-x86_64-linux.S поставляемый Normal file
Просмотреть файл

@ -0,0 +1,279 @@
.text
.global KeyExpansionStdcall
KeyExpansionStdcall:
movdqu 0 (%rdi), %xmm1
mov %rsi, %rdx
movdqu %xmm1, 0 (%rdx)
aeskeygenassist $1, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 16 (%rdx)
aeskeygenassist $2, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 32 (%rdx)
aeskeygenassist $4, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 48 (%rdx)
aeskeygenassist $8, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 64 (%rdx)
aeskeygenassist $16, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 80 (%rdx)
aeskeygenassist $32, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 96 (%rdx)
aeskeygenassist $64, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 112 (%rdx)
aeskeygenassist $128, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 128 (%rdx)
aeskeygenassist $27, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 144 (%rdx)
aeskeygenassist $54, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 160 (%rdx)
pxor %xmm1, %xmm1
pxor %xmm2, %xmm2
pxor %xmm3, %xmm3
ret
.global KeyExpansionAndInversionStdcall
KeyExpansionAndInversionStdcall:
movdqu 0 (%rdi), %xmm1
mov %rsi, %rdx
movdqu %xmm1, 0 (%rdx)
aeskeygenassist $1, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 16 (%rdx)
aeskeygenassist $2, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 32 (%rdx)
aeskeygenassist $4, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 48 (%rdx)
aeskeygenassist $8, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 64 (%rdx)
aeskeygenassist $16, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 80 (%rdx)
aeskeygenassist $32, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 96 (%rdx)
aeskeygenassist $64, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 112 (%rdx)
aeskeygenassist $128, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 128 (%rdx)
aeskeygenassist $27, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 144 (%rdx)
aeskeygenassist $54, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 160 (%rdx)
movdqu 16 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 16 (%rdx)
movdqu 32 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 32 (%rdx)
movdqu 48 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 48 (%rdx)
movdqu 64 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 64 (%rdx)
movdqu 80 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 80 (%rdx)
movdqu 96 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 96 (%rdx)
movdqu 112 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 112 (%rdx)
movdqu 128 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 128 (%rdx)
movdqu 144 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 144 (%rdx)
pxor %xmm1, %xmm1
pxor %xmm2, %xmm2
pxor %xmm3, %xmm3
ret
.global AES128EncryptOneBlockStdcall
AES128EncryptOneBlockStdcall:
movdqu 0 (%rsi), %xmm0
mov %rdx, %r8
movdqu 0 (%r8), %xmm2
pxor %xmm2, %xmm0
movdqu 16 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 32 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 48 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 64 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 80 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 96 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 112 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 128 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 144 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 160 (%r8), %xmm2
aesenclast %xmm2, %xmm0
pxor %xmm2, %xmm2
movdqu %xmm0, 0 (%rdi)
ret

276
3rdparty/evercrypt/aes-x86_64-mingw.S поставляемый Normal file
Просмотреть файл

@ -0,0 +1,276 @@
.text
.global KeyExpansionStdcall
KeyExpansionStdcall:
movdqu 0 (%rcx), %xmm1
movdqu %xmm1, 0 (%rdx)
aeskeygenassist $1, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 16 (%rdx)
aeskeygenassist $2, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 32 (%rdx)
aeskeygenassist $4, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 48 (%rdx)
aeskeygenassist $8, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 64 (%rdx)
aeskeygenassist $16, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 80 (%rdx)
aeskeygenassist $32, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 96 (%rdx)
aeskeygenassist $64, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 112 (%rdx)
aeskeygenassist $128, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 128 (%rdx)
aeskeygenassist $27, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 144 (%rdx)
aeskeygenassist $54, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 160 (%rdx)
pxor %xmm1, %xmm1
pxor %xmm2, %xmm2
pxor %xmm3, %xmm3
ret
.global KeyExpansionAndInversionStdcall
KeyExpansionAndInversionStdcall:
movdqu 0 (%rcx), %xmm1
movdqu %xmm1, 0 (%rdx)
aeskeygenassist $1, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 16 (%rdx)
aeskeygenassist $2, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 32 (%rdx)
aeskeygenassist $4, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 48 (%rdx)
aeskeygenassist $8, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 64 (%rdx)
aeskeygenassist $16, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 80 (%rdx)
aeskeygenassist $32, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 96 (%rdx)
aeskeygenassist $64, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 112 (%rdx)
aeskeygenassist $128, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 128 (%rdx)
aeskeygenassist $27, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 144 (%rdx)
aeskeygenassist $54, %xmm1, %xmm2
pshufd $255, %xmm2, %xmm2
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
vpslldq $4, %xmm1, %xmm3
pxor %xmm3, %xmm1
pxor %xmm2, %xmm1
movdqu %xmm1, 160 (%rdx)
movdqu 16 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 16 (%rdx)
movdqu 32 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 32 (%rdx)
movdqu 48 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 48 (%rdx)
movdqu 64 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 64 (%rdx)
movdqu 80 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 80 (%rdx)
movdqu 96 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 96 (%rdx)
movdqu 112 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 112 (%rdx)
movdqu 128 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 128 (%rdx)
movdqu 144 (%rdx), %xmm1
aesimc %xmm1, %xmm1
movdqu %xmm1, 144 (%rdx)
pxor %xmm1, %xmm1
pxor %xmm2, %xmm2
pxor %xmm3, %xmm3
ret
.global AES128EncryptOneBlockStdcall
AES128EncryptOneBlockStdcall:
movdqu 0 (%rdx), %xmm0
movdqu 0 (%r8), %xmm2
pxor %xmm2, %xmm0
movdqu 16 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 32 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 48 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 64 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 80 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 96 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 112 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 128 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 144 (%r8), %xmm2
aesenc %xmm2, %xmm0
movdqu 160 (%r8), %xmm2
aesenclast %xmm2, %xmm0
pxor %xmm2, %xmm2
movdqu %xmm0, 0 (%rcx)
ret

4814
3rdparty/evercrypt/aesgcm-x86_64-darwin.S поставляемый Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

4814
3rdparty/evercrypt/aesgcm-x86_64-linux.S поставляемый Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

5132
3rdparty/evercrypt/aesgcm-x86_64-mingw.S поставляемый Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

26
3rdparty/evercrypt/cpuid-x86_64-darwin.S поставляемый Normal file
Просмотреть файл

@ -0,0 +1,26 @@
.text
.global _check_aesni_stdcall
_check_aesni_stdcall:
mov %rbx, %r9
mov $1, %rax
cpuid
mov %rcx, %rax
and $33554432, %rax
shr $24, %rax
and $2, %rcx
and %rcx, %rax
mov %r9, %rbx
ret
.global _check_sha_stdcall
_check_sha_stdcall:
mov %rbx, %r9
mov $7, %rax
mov $0, %rcx
cpuid
and $536870912, %rbx
mov %rbx, %rax
mov %r9, %rbx
ret

26
3rdparty/evercrypt/cpuid-x86_64-linux.S поставляемый Normal file
Просмотреть файл

@ -0,0 +1,26 @@
.text
.global check_aesni_stdcall
check_aesni_stdcall:
mov %rbx, %r9
mov $1, %rax
cpuid
mov %rcx, %rax
and $33554432, %rax
shr $24, %rax
and $2, %rcx
and %rcx, %rax
mov %r9, %rbx
ret
.global check_sha_stdcall
check_sha_stdcall:
mov %rbx, %r9
mov $7, %rax
mov $0, %rcx
cpuid
and $536870912, %rbx
mov %rbx, %rax
mov %r9, %rbx
ret

26
3rdparty/evercrypt/cpuid-x86_64-mingw.S поставляемый Normal file
Просмотреть файл

@ -0,0 +1,26 @@
.text
.global check_aesni_stdcall
check_aesni_stdcall:
mov %rbx, %r9
mov $1, %rax
cpuid
mov %rcx, %rax
and $33554432, %rax
shr $24, %rax
and $2, %rcx
and %rcx, %rax
mov %r9, %rbx
ret
.global check_sha_stdcall
check_sha_stdcall:
mov %rbx, %r9
mov $7, %rax
mov $0, %rcx
cpuid
and $536870912, %rbx
mov %rbx, %rax
mov %r9, %rbx
ret

760
3rdparty/evercrypt/curve25519-x86_64-darwin.S поставляемый Normal file
Просмотреть файл

@ -0,0 +1,760 @@
.text
.global _add1
_add1:
push %rsi
mov %rdx, %rcx
xor %r8, %r8
xor %r9, %r9
xor %r10, %r10
xor %r11, %r11
xor %rax, %rax
addq 0(%rsi), %rcx
movq %rcx, 0(%rdi)
adcxq 8(%rsi), %r8
movq %r8, 8(%rdi)
adcxq 16(%rsi), %r9
movq %r9, 16(%rdi)
adcxq 24(%rsi), %r10
movq %r10, 24(%rdi)
adcx %r11, %rax
pop %rsi
ret
.global _fadd
_fadd:
movq 0(%rdx), %r8
addq 0(%rsi), %r8
movq 8(%rdx), %r9
adcxq 8(%rsi), %r9
movq 16(%rdx), %r10
adcxq 16(%rsi), %r10
movq 24(%rdx), %r11
adcxq 24(%rsi), %r11
mov $0, %rax
mov $38, %rdx
cmovc %rdx, %rax
xor %rcx, %rcx
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
ret
.global _fsub
_fsub:
movq 0(%rsi), %r8
subq 0(%rdx), %r8
movq 8(%rsi), %r9
sbbq 8(%rdx), %r9
movq 16(%rsi), %r10
sbbq 16(%rdx), %r10
movq 24(%rsi), %r11
sbbq 24(%rdx), %r11
mov $0, %rax
mov $38, %rcx
cmovc %rcx, %rax
sub %rax, %r8
sbb $0, %r9
sbb $0, %r10
sbb $0, %r11
mov $0, %rax
cmovc %rcx, %rax
sub %rax, %r8
movq %r8, 0(%rdi)
movq %r9, 8(%rdi)
movq %r10, 16(%rdi)
movq %r11, 24(%rdi)
ret
.global _fmul1
_fmul1:
push %r12
push %r13
mulxq 0(%rsi), %r8, %rcx
mulxq 8(%rsi), %r9, %r12
add %rcx, %r9
mov $0, %rcx
mulxq 16(%rsi), %r10, %r13
adcx %r12, %r10
mulxq 24(%rsi), %r11, %rax
adcx %r13, %r11
adcx %rcx, %rax
mov $38, %rdx
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
pop %r13
pop %r12
ret
.global _fmul_v
_fmul_v:
push %r12
push %r13
push %r14
push %rdx
movq 0(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
movq %r8, 0(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
movq %r10, 8(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
mov $0, %rax
adox %rdx, %rax
movq 8(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 8(%rdi), %r8
movq %r8, 8(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 16(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 16(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 16(%rdi), %r8
movq %r8, 16(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 24(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 24(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 24(%rdi), %r8
movq %r8, 24(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 32(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
movq %r12, 40(%rdi)
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
movq %r14, 48(%rdi)
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq %rax, 56(%rdi)
mov %rdi, %rsi
pop %rdi
mov $38, %rdx
mulxq 32(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 0(%rsi), %r8
mulxq 40(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 8(%rsi), %r9
mulxq 48(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 16(%rsi), %r10
mulxq 56(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 24(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
pop %r14
pop %r13
pop %r12
ret
.global _fmul2_v
_fmul2_v:
push %r12
push %r13
push %r14
push %rdx
movq 0(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
movq %r8, 0(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
movq %r10, 8(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
mov $0, %rax
adox %rdx, %rax
movq 8(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 8(%rdi), %r8
movq %r8, 8(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 16(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 16(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 16(%rdi), %r8
movq %r8, 16(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 24(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 24(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 24(%rdi), %r8
movq %r8, 24(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 32(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
movq %r12, 40(%rdi)
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
movq %r14, 48(%rdi)
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq %rax, 56(%rdi)
movq 32(%rsi), %rdx
mulxq 32(%rcx), %r8, %r9
xor %r10, %r10
movq %r8, 64(%rdi)
mulxq 40(%rcx), %r10, %r11
adox %r9, %r10
movq %r10, 72(%rdi)
mulxq 48(%rcx), %r12, %r13
adox %r11, %r12
mulxq 56(%rcx), %r14, %rdx
adox %r13, %r14
mov $0, %rax
adox %rdx, %rax
movq 40(%rsi), %rdx
mulxq 32(%rcx), %r8, %r9
xor %r10, %r10
adcxq 72(%rdi), %r8
movq %r8, 72(%rdi)
mulxq 40(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 80(%rdi)
mulxq 48(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 56(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 48(%rsi), %rdx
mulxq 32(%rcx), %r8, %r9
xor %r10, %r10
adcxq 80(%rdi), %r8
movq %r8, 80(%rdi)
mulxq 40(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 88(%rdi)
mulxq 48(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 56(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 56(%rsi), %rdx
mulxq 32(%rcx), %r8, %r9
xor %r10, %r10
adcxq 88(%rdi), %r8
movq %r8, 88(%rdi)
mulxq 40(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 96(%rdi)
mulxq 48(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
movq %r12, 104(%rdi)
mov $0, %r8
mulxq 56(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
movq %r14, 112(%rdi)
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq %rax, 120(%rdi)
mov %rdi, %rsi
pop %rdi
mov $38, %rdx
mulxq 32(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 0(%rsi), %r8
mulxq 40(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 8(%rsi), %r9
mulxq 48(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 16(%rsi), %r10
mulxq 56(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 24(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
mov $38, %rdx
mulxq 96(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 64(%rsi), %r8
mulxq 104(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 72(%rsi), %r9
mulxq 112(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 80(%rsi), %r10
mulxq 120(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 88(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 40(%rdi)
adcx %rcx, %r10
movq %r10, 48(%rdi)
adcx %rcx, %r11
movq %r11, 56(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 32(%rdi)
pop %r14
pop %r13
pop %r12
ret
.global _fsqr_v
_fsqr_v:
push %r15
push %r12
push %r13
push %r14
push %rdx
movq 0(%rsi), %rdx
mulxq 8(%rsi), %r8, %r14
xor %r15, %r15
mulxq 16(%rsi), %r9, %r10
adcx %r14, %r9
mulxq 24(%rsi), %rax, %rcx
adcx %rax, %r10
movq 24(%rsi), %rdx
mulxq 8(%rsi), %r11, %r12
adcx %rcx, %r11
mulxq 16(%rsi), %rax, %r13
adcx %rax, %r12
movq 8(%rsi), %rdx
adcx %r15, %r13
mulxq 16(%rsi), %rax, %rcx
mov $0, %r14
xor %r15, %r15
adox %rax, %r10
adcx %r8, %r8
adox %rcx, %r11
adcx %r9, %r9
adox %r15, %r12
adcx %r10, %r10
adox %r15, %r13
adcx %r11, %r11
adox %r15, %r14
adcx %r12, %r12
adcx %r13, %r13
adcx %r14, %r14
movq 0(%rsi), %rdx
mulx %rdx, %rax, %rcx
movq %rax, 0(%rdi)
add %rcx, %r8
movq %r8, 8(%rdi)
movq 8(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r9
movq %r9, 16(%rdi)
adcx %rcx, %r10
movq %r10, 24(%rdi)
movq 16(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r11
movq %r11, 32(%rdi)
adcx %rcx, %r12
movq %r12, 40(%rdi)
movq 24(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r13
movq %r13, 48(%rdi)
adcx %rcx, %r14
movq %r14, 56(%rdi)
mov %rdi, %rsi
pop %rdi
mov $38, %rdx
mulxq 32(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 0(%rsi), %r8
mulxq 40(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 8(%rsi), %r9
mulxq 48(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 16(%rsi), %r10
mulxq 56(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 24(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
pop %r14
pop %r13
pop %r12
pop %r15
ret
.global _fsqr2_v
_fsqr2_v:
push %r15
push %r12
push %r13
push %r14
push %rdx
movq 0(%rsi), %rdx
mulxq 8(%rsi), %r8, %r14
xor %r15, %r15
mulxq 16(%rsi), %r9, %r10
adcx %r14, %r9
mulxq 24(%rsi), %rax, %rcx
adcx %rax, %r10
movq 24(%rsi), %rdx
mulxq 8(%rsi), %r11, %r12
adcx %rcx, %r11
mulxq 16(%rsi), %rax, %r13
adcx %rax, %r12
movq 8(%rsi), %rdx
adcx %r15, %r13
mulxq 16(%rsi), %rax, %rcx
mov $0, %r14
xor %r15, %r15
adox %rax, %r10
adcx %r8, %r8
adox %rcx, %r11
adcx %r9, %r9
adox %r15, %r12
adcx %r10, %r10
adox %r15, %r13
adcx %r11, %r11
adox %r15, %r14
adcx %r12, %r12
adcx %r13, %r13
adcx %r14, %r14
movq 0(%rsi), %rdx
mulx %rdx, %rax, %rcx
movq %rax, 0(%rdi)
add %rcx, %r8
movq %r8, 8(%rdi)
movq 8(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r9
movq %r9, 16(%rdi)
adcx %rcx, %r10
movq %r10, 24(%rdi)
movq 16(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r11
movq %r11, 32(%rdi)
adcx %rcx, %r12
movq %r12, 40(%rdi)
movq 24(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r13
movq %r13, 48(%rdi)
adcx %rcx, %r14
movq %r14, 56(%rdi)
movq 32(%rsi), %rdx
mulxq 40(%rsi), %r8, %r14
xor %r15, %r15
mulxq 48(%rsi), %r9, %r10
adcx %r14, %r9
mulxq 56(%rsi), %rax, %rcx
adcx %rax, %r10
movq 56(%rsi), %rdx
mulxq 40(%rsi), %r11, %r12
adcx %rcx, %r11
mulxq 48(%rsi), %rax, %r13
adcx %rax, %r12
movq 40(%rsi), %rdx
adcx %r15, %r13
mulxq 48(%rsi), %rax, %rcx
mov $0, %r14
xor %r15, %r15
adox %rax, %r10
adcx %r8, %r8
adox %rcx, %r11
adcx %r9, %r9
adox %r15, %r12
adcx %r10, %r10
adox %r15, %r13
adcx %r11, %r11
adox %r15, %r14
adcx %r12, %r12
adcx %r13, %r13
adcx %r14, %r14
movq 32(%rsi), %rdx
mulx %rdx, %rax, %rcx
movq %rax, 64(%rdi)
add %rcx, %r8
movq %r8, 72(%rdi)
movq 40(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r9
movq %r9, 80(%rdi)
adcx %rcx, %r10
movq %r10, 88(%rdi)
movq 48(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r11
movq %r11, 96(%rdi)
adcx %rcx, %r12
movq %r12, 104(%rdi)
movq 56(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r13
movq %r13, 112(%rdi)
adcx %rcx, %r14
movq %r14, 120(%rdi)
mov %rdi, %rsi
pop %rdi
mov $38, %rdx
mulxq 32(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 0(%rsi), %r8
mulxq 40(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 8(%rsi), %r9
mulxq 48(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 16(%rsi), %r10
mulxq 56(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 24(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
mov $38, %rdx
mulxq 96(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 64(%rsi), %r8
mulxq 104(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 72(%rsi), %r9
mulxq 112(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 80(%rsi), %r10
mulxq 120(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 88(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 40(%rdi)
adcx %rcx, %r10
movq %r10, 48(%rdi)
adcx %rcx, %r11
movq %r11, 56(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 32(%rdi)
pop %r14
pop %r13
pop %r12
pop %r15
ret
.global _cswap2
_cswap2:
add $18446744073709551615, %rdx
movq 0(%rdi), %r8
movq 0(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 0(%rdi)
movq %r9, 0(%rsi)
movq 8(%rdi), %r8
movq 8(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 8(%rdi)
movq %r9, 8(%rsi)
movq 16(%rdi), %r8
movq 16(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 16(%rdi)
movq %r9, 16(%rsi)
movq 24(%rdi), %r8
movq 24(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 24(%rdi)
movq %r9, 24(%rsi)
movq 32(%rdi), %r8
movq 32(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 32(%rdi)
movq %r9, 32(%rsi)
movq 40(%rdi), %r8
movq 40(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 40(%rdi)
movq %r9, 40(%rsi)
movq 48(%rdi), %r8
movq 48(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 48(%rdi)
movq %r9, 48(%rsi)
movq 56(%rdi), %r8
movq 56(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 56(%rdi)
movq %r9, 56(%rsi)
ret

760
3rdparty/evercrypt/curve25519-x86_64-linux.S поставляемый Normal file
Просмотреть файл

@ -0,0 +1,760 @@
.text
.global add1
add1:
push %rsi
mov %rdx, %rcx
xor %r8, %r8
xor %r9, %r9
xor %r10, %r10
xor %r11, %r11
xor %rax, %rax
addq 0(%rsi), %rcx
movq %rcx, 0(%rdi)
adcxq 8(%rsi), %r8
movq %r8, 8(%rdi)
adcxq 16(%rsi), %r9
movq %r9, 16(%rdi)
adcxq 24(%rsi), %r10
movq %r10, 24(%rdi)
adcx %r11, %rax
pop %rsi
ret
.global fadd
fadd:
movq 0(%rdx), %r8
addq 0(%rsi), %r8
movq 8(%rdx), %r9
adcxq 8(%rsi), %r9
movq 16(%rdx), %r10
adcxq 16(%rsi), %r10
movq 24(%rdx), %r11
adcxq 24(%rsi), %r11
mov $0, %rax
mov $38, %rdx
cmovc %rdx, %rax
xor %rcx, %rcx
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
ret
.global fsub
fsub:
movq 0(%rsi), %r8
subq 0(%rdx), %r8
movq 8(%rsi), %r9
sbbq 8(%rdx), %r9
movq 16(%rsi), %r10
sbbq 16(%rdx), %r10
movq 24(%rsi), %r11
sbbq 24(%rdx), %r11
mov $0, %rax
mov $38, %rcx
cmovc %rcx, %rax
sub %rax, %r8
sbb $0, %r9
sbb $0, %r10
sbb $0, %r11
mov $0, %rax
cmovc %rcx, %rax
sub %rax, %r8
movq %r8, 0(%rdi)
movq %r9, 8(%rdi)
movq %r10, 16(%rdi)
movq %r11, 24(%rdi)
ret
.global fmul1
fmul1:
push %r12
push %r13
mulxq 0(%rsi), %r8, %rcx
mulxq 8(%rsi), %r9, %r12
add %rcx, %r9
mov $0, %rcx
mulxq 16(%rsi), %r10, %r13
adcx %r12, %r10
mulxq 24(%rsi), %r11, %rax
adcx %r13, %r11
adcx %rcx, %rax
mov $38, %rdx
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
pop %r13
pop %r12
ret
.global fmul_v
fmul_v:
push %r12
push %r13
push %r14
push %rdx
movq 0(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
movq %r8, 0(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
movq %r10, 8(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
mov $0, %rax
adox %rdx, %rax
movq 8(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 8(%rdi), %r8
movq %r8, 8(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 16(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 16(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 16(%rdi), %r8
movq %r8, 16(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 24(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 24(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 24(%rdi), %r8
movq %r8, 24(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 32(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
movq %r12, 40(%rdi)
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
movq %r14, 48(%rdi)
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq %rax, 56(%rdi)
mov %rdi, %rsi
pop %rdi
mov $38, %rdx
mulxq 32(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 0(%rsi), %r8
mulxq 40(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 8(%rsi), %r9
mulxq 48(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 16(%rsi), %r10
mulxq 56(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 24(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
pop %r14
pop %r13
pop %r12
ret
.global fmul2_v
fmul2_v:
push %r12
push %r13
push %r14
push %rdx
movq 0(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
movq %r8, 0(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
movq %r10, 8(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
mov $0, %rax
adox %rdx, %rax
movq 8(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 8(%rdi), %r8
movq %r8, 8(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 16(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 16(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 16(%rdi), %r8
movq %r8, 16(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 24(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 24(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 24(%rdi), %r8
movq %r8, 24(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 32(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
movq %r12, 40(%rdi)
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
movq %r14, 48(%rdi)
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq %rax, 56(%rdi)
movq 32(%rsi), %rdx
mulxq 32(%rcx), %r8, %r9
xor %r10, %r10
movq %r8, 64(%rdi)
mulxq 40(%rcx), %r10, %r11
adox %r9, %r10
movq %r10, 72(%rdi)
mulxq 48(%rcx), %r12, %r13
adox %r11, %r12
mulxq 56(%rcx), %r14, %rdx
adox %r13, %r14
mov $0, %rax
adox %rdx, %rax
movq 40(%rsi), %rdx
mulxq 32(%rcx), %r8, %r9
xor %r10, %r10
adcxq 72(%rdi), %r8
movq %r8, 72(%rdi)
mulxq 40(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 80(%rdi)
mulxq 48(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 56(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 48(%rsi), %rdx
mulxq 32(%rcx), %r8, %r9
xor %r10, %r10
adcxq 80(%rdi), %r8
movq %r8, 80(%rdi)
mulxq 40(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 88(%rdi)
mulxq 48(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 56(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 56(%rsi), %rdx
mulxq 32(%rcx), %r8, %r9
xor %r10, %r10
adcxq 88(%rdi), %r8
movq %r8, 88(%rdi)
mulxq 40(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 96(%rdi)
mulxq 48(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
movq %r12, 104(%rdi)
mov $0, %r8
mulxq 56(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
movq %r14, 112(%rdi)
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq %rax, 120(%rdi)
mov %rdi, %rsi
pop %rdi
mov $38, %rdx
mulxq 32(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 0(%rsi), %r8
mulxq 40(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 8(%rsi), %r9
mulxq 48(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 16(%rsi), %r10
mulxq 56(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 24(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
mov $38, %rdx
mulxq 96(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 64(%rsi), %r8
mulxq 104(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 72(%rsi), %r9
mulxq 112(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 80(%rsi), %r10
mulxq 120(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 88(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 40(%rdi)
adcx %rcx, %r10
movq %r10, 48(%rdi)
adcx %rcx, %r11
movq %r11, 56(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 32(%rdi)
pop %r14
pop %r13
pop %r12
ret
.global fsqr_v
fsqr_v:
push %r15
push %r12
push %r13
push %r14
push %rdx
movq 0(%rsi), %rdx
mulxq 8(%rsi), %r8, %r14
xor %r15, %r15
mulxq 16(%rsi), %r9, %r10
adcx %r14, %r9
mulxq 24(%rsi), %rax, %rcx
adcx %rax, %r10
movq 24(%rsi), %rdx
mulxq 8(%rsi), %r11, %r12
adcx %rcx, %r11
mulxq 16(%rsi), %rax, %r13
adcx %rax, %r12
movq 8(%rsi), %rdx
adcx %r15, %r13
mulxq 16(%rsi), %rax, %rcx
mov $0, %r14
xor %r15, %r15
adox %rax, %r10
adcx %r8, %r8
adox %rcx, %r11
adcx %r9, %r9
adox %r15, %r12
adcx %r10, %r10
adox %r15, %r13
adcx %r11, %r11
adox %r15, %r14
adcx %r12, %r12
adcx %r13, %r13
adcx %r14, %r14
movq 0(%rsi), %rdx
mulx %rdx, %rax, %rcx
movq %rax, 0(%rdi)
add %rcx, %r8
movq %r8, 8(%rdi)
movq 8(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r9
movq %r9, 16(%rdi)
adcx %rcx, %r10
movq %r10, 24(%rdi)
movq 16(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r11
movq %r11, 32(%rdi)
adcx %rcx, %r12
movq %r12, 40(%rdi)
movq 24(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r13
movq %r13, 48(%rdi)
adcx %rcx, %r14
movq %r14, 56(%rdi)
mov %rdi, %rsi
pop %rdi
mov $38, %rdx
mulxq 32(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 0(%rsi), %r8
mulxq 40(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 8(%rsi), %r9
mulxq 48(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 16(%rsi), %r10
mulxq 56(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 24(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
pop %r14
pop %r13
pop %r12
pop %r15
ret
.global fsqr2_v
fsqr2_v:
push %r15
push %r12
push %r13
push %r14
push %rdx
movq 0(%rsi), %rdx
mulxq 8(%rsi), %r8, %r14
xor %r15, %r15
mulxq 16(%rsi), %r9, %r10
adcx %r14, %r9
mulxq 24(%rsi), %rax, %rcx
adcx %rax, %r10
movq 24(%rsi), %rdx
mulxq 8(%rsi), %r11, %r12
adcx %rcx, %r11
mulxq 16(%rsi), %rax, %r13
adcx %rax, %r12
movq 8(%rsi), %rdx
adcx %r15, %r13
mulxq 16(%rsi), %rax, %rcx
mov $0, %r14
xor %r15, %r15
adox %rax, %r10
adcx %r8, %r8
adox %rcx, %r11
adcx %r9, %r9
adox %r15, %r12
adcx %r10, %r10
adox %r15, %r13
adcx %r11, %r11
adox %r15, %r14
adcx %r12, %r12
adcx %r13, %r13
adcx %r14, %r14
movq 0(%rsi), %rdx
mulx %rdx, %rax, %rcx
movq %rax, 0(%rdi)
add %rcx, %r8
movq %r8, 8(%rdi)
movq 8(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r9
movq %r9, 16(%rdi)
adcx %rcx, %r10
movq %r10, 24(%rdi)
movq 16(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r11
movq %r11, 32(%rdi)
adcx %rcx, %r12
movq %r12, 40(%rdi)
movq 24(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r13
movq %r13, 48(%rdi)
adcx %rcx, %r14
movq %r14, 56(%rdi)
movq 32(%rsi), %rdx
mulxq 40(%rsi), %r8, %r14
xor %r15, %r15
mulxq 48(%rsi), %r9, %r10
adcx %r14, %r9
mulxq 56(%rsi), %rax, %rcx
adcx %rax, %r10
movq 56(%rsi), %rdx
mulxq 40(%rsi), %r11, %r12
adcx %rcx, %r11
mulxq 48(%rsi), %rax, %r13
adcx %rax, %r12
movq 40(%rsi), %rdx
adcx %r15, %r13
mulxq 48(%rsi), %rax, %rcx
mov $0, %r14
xor %r15, %r15
adox %rax, %r10
adcx %r8, %r8
adox %rcx, %r11
adcx %r9, %r9
adox %r15, %r12
adcx %r10, %r10
adox %r15, %r13
adcx %r11, %r11
adox %r15, %r14
adcx %r12, %r12
adcx %r13, %r13
adcx %r14, %r14
movq 32(%rsi), %rdx
mulx %rdx, %rax, %rcx
movq %rax, 64(%rdi)
add %rcx, %r8
movq %r8, 72(%rdi)
movq 40(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r9
movq %r9, 80(%rdi)
adcx %rcx, %r10
movq %r10, 88(%rdi)
movq 48(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r11
movq %r11, 96(%rdi)
adcx %rcx, %r12
movq %r12, 104(%rdi)
movq 56(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r13
movq %r13, 112(%rdi)
adcx %rcx, %r14
movq %r14, 120(%rdi)
mov %rdi, %rsi
pop %rdi
mov $38, %rdx
mulxq 32(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 0(%rsi), %r8
mulxq 40(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 8(%rsi), %r9
mulxq 48(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 16(%rsi), %r10
mulxq 56(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 24(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
mov $38, %rdx
mulxq 96(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 64(%rsi), %r8
mulxq 104(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 72(%rsi), %r9
mulxq 112(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 80(%rsi), %r10
mulxq 120(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 88(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 40(%rdi)
adcx %rcx, %r10
movq %r10, 48(%rdi)
adcx %rcx, %r11
movq %r11, 56(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 32(%rdi)
pop %r14
pop %r13
pop %r12
pop %r15
ret
.global cswap2
cswap2:
add $18446744073709551615, %rdx
movq 0(%rdi), %r8
movq 0(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 0(%rdi)
movq %r9, 0(%rsi)
movq 8(%rdi), %r8
movq 8(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 8(%rdi)
movq %r9, 8(%rsi)
movq 16(%rdi), %r8
movq 16(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 16(%rdi)
movq %r9, 16(%rsi)
movq 24(%rdi), %r8
movq 24(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 24(%rdi)
movq %r9, 24(%rsi)
movq 32(%rdi), %r8
movq 32(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 32(%rdi)
movq %r9, 32(%rsi)
movq 40(%rdi), %r8
movq 40(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 40(%rdi)
movq %r9, 40(%rsi)
movq 48(%rdi), %r8
movq 48(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 48(%rdi)
movq %r9, 48(%rsi)
movq 56(%rdi), %r8
movq 56(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 56(%rdi)
movq %r9, 56(%rsi)
ret

801
3rdparty/evercrypt/curve25519-x86_64-mingw.S поставляемый Normal file
Просмотреть файл

@ -0,0 +1,801 @@
.text
.global add1
add1:
push %rsi
mov %rcx, %rdi
mov %rdx, %rsi
mov %r8, %rdx
mov %rdx, %rcx
xor %r8, %r8
xor %r9, %r9
xor %r10, %r10
xor %r11, %r11
xor %rax, %rax
addq 0(%rsi), %rcx
movq %rcx, 0(%rdi)
adcxq 8(%rsi), %r8
movq %r8, 8(%rdi)
adcxq 16(%rsi), %r9
movq %r9, 16(%rdi)
adcxq 24(%rsi), %r10
movq %r10, 24(%rdi)
adcx %r11, %rax
pop %rsi
ret
.global fadd
fadd:
push %rsi
mov %rcx, %rdi
mov %rdx, %rsi
mov %r8, %rdx
movq 0(%rdx), %r8
addq 0(%rsi), %r8
movq 8(%rdx), %r9
adcxq 8(%rsi), %r9
movq 16(%rdx), %r10
adcxq 16(%rsi), %r10
movq 24(%rdx), %r11
adcxq 24(%rsi), %r11
mov $0, %rax
mov $38, %rdx
cmovc %rdx, %rax
xor %rcx, %rcx
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
pop %rsi
ret
.global fsub
fsub:
push %rsi
mov %rcx, %rdi
mov %rdx, %rsi
mov %r8, %rdx
movq 0(%rsi), %r8
subq 0(%rdx), %r8
movq 8(%rsi), %r9
sbbq 8(%rdx), %r9
movq 16(%rsi), %r10
sbbq 16(%rdx), %r10
movq 24(%rsi), %r11
sbbq 24(%rdx), %r11
mov $0, %rax
mov $38, %rcx
cmovc %rcx, %rax
sub %rax, %r8
sbb $0, %r9
sbb $0, %r10
sbb $0, %r11
mov $0, %rax
cmovc %rcx, %rax
sub %rax, %r8
movq %r8, 0(%rdi)
movq %r9, 8(%rdi)
movq %r10, 16(%rdi)
movq %r11, 24(%rdi)
pop %rsi
ret
.global fmul1
fmul1:
push %r12
push %r13
push %rsi
mov %rcx, %rdi
mov %rdx, %rsi
mov %r8, %rdx
mulxq 0(%rsi), %r8, %rcx
mulxq 8(%rsi), %r9, %r12
add %rcx, %r9
mov $0, %rcx
mulxq 16(%rsi), %r10, %r13
adcx %r12, %r10
mulxq 24(%rsi), %r11, %rax
adcx %r13, %r11
adcx %rcx, %rax
mov $38, %rdx
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
pop %rsi
pop %r13
pop %r12
ret
.global fmul_v
fmul_v:
push %r12
push %r13
push %r14
push %rsi
mov %rcx, %rdi
mov %rdx, %rsi
mov %r9, %rcx
push %r8
movq 0(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
movq %r8, 0(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
movq %r10, 8(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
mov $0, %rax
adox %rdx, %rax
movq 8(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 8(%rdi), %r8
movq %r8, 8(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 16(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 16(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 16(%rdi), %r8
movq %r8, 16(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 24(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 24(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 24(%rdi), %r8
movq %r8, 24(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 32(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
movq %r12, 40(%rdi)
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
movq %r14, 48(%rdi)
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq %rax, 56(%rdi)
mov %rdi, %rsi
pop %rdi
mov $38, %rdx
mulxq 32(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 0(%rsi), %r8
mulxq 40(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 8(%rsi), %r9
mulxq 48(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 16(%rsi), %r10
mulxq 56(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 24(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
pop %rsi
pop %r14
pop %r13
pop %r12
ret
.global fmul2_v
fmul2_v:
push %r12
push %r13
push %r14
push %rsi
mov %rcx, %rdi
mov %rdx, %rsi
mov %r9, %rcx
push %r8
movq 0(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
movq %r8, 0(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
movq %r10, 8(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
mov $0, %rax
adox %rdx, %rax
movq 8(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 8(%rdi), %r8
movq %r8, 8(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 16(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 16(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 16(%rdi), %r8
movq %r8, 16(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 24(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 24(%rsi), %rdx
mulxq 0(%rcx), %r8, %r9
xor %r10, %r10
adcxq 24(%rdi), %r8
movq %r8, 24(%rdi)
mulxq 8(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 32(%rdi)
mulxq 16(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
movq %r12, 40(%rdi)
mov $0, %r8
mulxq 24(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
movq %r14, 48(%rdi)
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq %rax, 56(%rdi)
movq 32(%rsi), %rdx
mulxq 32(%rcx), %r8, %r9
xor %r10, %r10
movq %r8, 64(%rdi)
mulxq 40(%rcx), %r10, %r11
adox %r9, %r10
movq %r10, 72(%rdi)
mulxq 48(%rcx), %r12, %r13
adox %r11, %r12
mulxq 56(%rcx), %r14, %rdx
adox %r13, %r14
mov $0, %rax
adox %rdx, %rax
movq 40(%rsi), %rdx
mulxq 32(%rcx), %r8, %r9
xor %r10, %r10
adcxq 72(%rdi), %r8
movq %r8, 72(%rdi)
mulxq 40(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 80(%rdi)
mulxq 48(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 56(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 48(%rsi), %rdx
mulxq 32(%rcx), %r8, %r9
xor %r10, %r10
adcxq 80(%rdi), %r8
movq %r8, 80(%rdi)
mulxq 40(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 88(%rdi)
mulxq 48(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
mov $0, %r8
mulxq 56(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq 56(%rsi), %rdx
mulxq 32(%rcx), %r8, %r9
xor %r10, %r10
adcxq 88(%rdi), %r8
movq %r8, 88(%rdi)
mulxq 40(%rcx), %r10, %r11
adox %r9, %r10
adcx %r12, %r10
movq %r10, 96(%rdi)
mulxq 48(%rcx), %r12, %r13
adox %r11, %r12
adcx %r14, %r12
movq %r12, 104(%rdi)
mov $0, %r8
mulxq 56(%rcx), %r14, %rdx
adox %r13, %r14
adcx %rax, %r14
movq %r14, 112(%rdi)
mov $0, %rax
adox %rdx, %rax
adcx %r8, %rax
movq %rax, 120(%rdi)
mov %rdi, %rsi
pop %rdi
mov $38, %rdx
mulxq 32(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 0(%rsi), %r8
mulxq 40(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 8(%rsi), %r9
mulxq 48(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 16(%rsi), %r10
mulxq 56(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 24(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
mov $38, %rdx
mulxq 96(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 64(%rsi), %r8
mulxq 104(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 72(%rsi), %r9
mulxq 112(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 80(%rsi), %r10
mulxq 120(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 88(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 40(%rdi)
adcx %rcx, %r10
movq %r10, 48(%rdi)
adcx %rcx, %r11
movq %r11, 56(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 32(%rdi)
pop %rsi
pop %r14
pop %r13
pop %r12
ret
.global fsqr_v
fsqr_v:
push %r15
push %r12
push %r13
push %r14
push %rsi
mov %rcx, %rdi
mov %rdx, %rsi
push %r8
movq 0(%rsi), %rdx
mulxq 8(%rsi), %r8, %r14
xor %r15, %r15
mulxq 16(%rsi), %r9, %r10
adcx %r14, %r9
mulxq 24(%rsi), %rax, %rcx
adcx %rax, %r10
movq 24(%rsi), %rdx
mulxq 8(%rsi), %r11, %r12
adcx %rcx, %r11
mulxq 16(%rsi), %rax, %r13
adcx %rax, %r12
movq 8(%rsi), %rdx
adcx %r15, %r13
mulxq 16(%rsi), %rax, %rcx
mov $0, %r14
xor %r15, %r15
adox %rax, %r10
adcx %r8, %r8
adox %rcx, %r11
adcx %r9, %r9
adox %r15, %r12
adcx %r10, %r10
adox %r15, %r13
adcx %r11, %r11
adox %r15, %r14
adcx %r12, %r12
adcx %r13, %r13
adcx %r14, %r14
movq 0(%rsi), %rdx
mulx %rdx, %rax, %rcx
movq %rax, 0(%rdi)
add %rcx, %r8
movq %r8, 8(%rdi)
movq 8(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r9
movq %r9, 16(%rdi)
adcx %rcx, %r10
movq %r10, 24(%rdi)
movq 16(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r11
movq %r11, 32(%rdi)
adcx %rcx, %r12
movq %r12, 40(%rdi)
movq 24(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r13
movq %r13, 48(%rdi)
adcx %rcx, %r14
movq %r14, 56(%rdi)
mov %rdi, %rsi
pop %rdi
mov $38, %rdx
mulxq 32(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 0(%rsi), %r8
mulxq 40(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 8(%rsi), %r9
mulxq 48(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 16(%rsi), %r10
mulxq 56(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 24(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
pop %rsi
pop %r14
pop %r13
pop %r12
pop %r15
ret
.global fsqr2_v
fsqr2_v:
push %r15
push %r12
push %r13
push %r14
push %rsi
mov %rcx, %rdi
mov %rdx, %rsi
push %r8
movq 0(%rsi), %rdx
mulxq 8(%rsi), %r8, %r14
xor %r15, %r15
mulxq 16(%rsi), %r9, %r10
adcx %r14, %r9
mulxq 24(%rsi), %rax, %rcx
adcx %rax, %r10
movq 24(%rsi), %rdx
mulxq 8(%rsi), %r11, %r12
adcx %rcx, %r11
mulxq 16(%rsi), %rax, %r13
adcx %rax, %r12
movq 8(%rsi), %rdx
adcx %r15, %r13
mulxq 16(%rsi), %rax, %rcx
mov $0, %r14
xor %r15, %r15
adox %rax, %r10
adcx %r8, %r8
adox %rcx, %r11
adcx %r9, %r9
adox %r15, %r12
adcx %r10, %r10
adox %r15, %r13
adcx %r11, %r11
adox %r15, %r14
adcx %r12, %r12
adcx %r13, %r13
adcx %r14, %r14
movq 0(%rsi), %rdx
mulx %rdx, %rax, %rcx
movq %rax, 0(%rdi)
add %rcx, %r8
movq %r8, 8(%rdi)
movq 8(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r9
movq %r9, 16(%rdi)
adcx %rcx, %r10
movq %r10, 24(%rdi)
movq 16(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r11
movq %r11, 32(%rdi)
adcx %rcx, %r12
movq %r12, 40(%rdi)
movq 24(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r13
movq %r13, 48(%rdi)
adcx %rcx, %r14
movq %r14, 56(%rdi)
movq 32(%rsi), %rdx
mulxq 40(%rsi), %r8, %r14
xor %r15, %r15
mulxq 48(%rsi), %r9, %r10
adcx %r14, %r9
mulxq 56(%rsi), %rax, %rcx
adcx %rax, %r10
movq 56(%rsi), %rdx
mulxq 40(%rsi), %r11, %r12
adcx %rcx, %r11
mulxq 48(%rsi), %rax, %r13
adcx %rax, %r12
movq 40(%rsi), %rdx
adcx %r15, %r13
mulxq 48(%rsi), %rax, %rcx
mov $0, %r14
xor %r15, %r15
adox %rax, %r10
adcx %r8, %r8
adox %rcx, %r11
adcx %r9, %r9
adox %r15, %r12
adcx %r10, %r10
adox %r15, %r13
adcx %r11, %r11
adox %r15, %r14
adcx %r12, %r12
adcx %r13, %r13
adcx %r14, %r14
movq 32(%rsi), %rdx
mulx %rdx, %rax, %rcx
movq %rax, 64(%rdi)
add %rcx, %r8
movq %r8, 72(%rdi)
movq 40(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r9
movq %r9, 80(%rdi)
adcx %rcx, %r10
movq %r10, 88(%rdi)
movq 48(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r11
movq %r11, 96(%rdi)
adcx %rcx, %r12
movq %r12, 104(%rdi)
movq 56(%rsi), %rdx
mulx %rdx, %rax, %rcx
adcx %rax, %r13
movq %r13, 112(%rdi)
adcx %rcx, %r14
movq %r14, 120(%rdi)
mov %rdi, %rsi
pop %rdi
mov $38, %rdx
mulxq 32(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 0(%rsi), %r8
mulxq 40(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 8(%rsi), %r9
mulxq 48(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 16(%rsi), %r10
mulxq 56(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 24(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 8(%rdi)
adcx %rcx, %r10
movq %r10, 16(%rdi)
adcx %rcx, %r11
movq %r11, 24(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 0(%rdi)
mov $38, %rdx
mulxq 96(%rsi), %r8, %r13
xor %rcx, %rcx
adoxq 64(%rsi), %r8
mulxq 104(%rsi), %r9, %r12
adcx %r13, %r9
adoxq 72(%rsi), %r9
mulxq 112(%rsi), %r10, %r13
adcx %r12, %r10
adoxq 80(%rsi), %r10
mulxq 120(%rsi), %r11, %rax
adcx %r13, %r11
adoxq 88(%rsi), %r11
adcx %rcx, %rax
adox %rcx, %rax
imul %rdx, %rax
add %rax, %r8
adcx %rcx, %r9
movq %r9, 40(%rdi)
adcx %rcx, %r10
movq %r10, 48(%rdi)
adcx %rcx, %r11
movq %r11, 56(%rdi)
mov $0, %rax
cmovc %rdx, %rax
add %rax, %r8
movq %r8, 32(%rdi)
pop %rsi
pop %r14
pop %r13
pop %r12
pop %r15
ret
.global cswap2
cswap2:
push %rsi
mov %rcx, %rdi
mov %rdx, %rsi
mov %r8, %rdx
add $18446744073709551615, %rdx
movq 0(%rdi), %r8
movq 0(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 0(%rdi)
movq %r9, 0(%rsi)
movq 8(%rdi), %r8
movq 8(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 8(%rdi)
movq %r9, 8(%rsi)
movq 16(%rdi), %r8
movq 16(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 16(%rdi)
movq %r9, 16(%rsi)
movq 24(%rdi), %r8
movq 24(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 24(%rdi)
movq %r9, 24(%rsi)
movq 32(%rdi), %r8
movq 32(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 32(%rdi)
movq %r9, 32(%rsi)
movq 40(%rdi), %r8
movq 40(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 40(%rdi)
movq %r9, 40(%rsi)
movq 48(%rdi), %r8
movq 48(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 48(%rdi)
movq %r9, 48(%rsi)
movq 56(%rdi), %r8
movq 56(%rsi), %r9
mov %r8, %r10
cmovc %r9, %r8
cmovc %r10, %r9
movq %r8, 56(%rdi)
movq %r9, 56(%rsi)
pop %rsi
ret

66
3rdparty/evercrypt/evercrypt_vale_stubs.c поставляемый Normal file
Просмотреть файл

@ -0,0 +1,66 @@
#include <inttypes.h>
#include "kremlin/internal/target.h"
#if defined(_MSC_VER) // Visual Studio - always use __stdcall
#define STDCALL __stdcall
#elif defined(WIN32) // GCC/MinGW targeting Windows 32-bit - use the __stdcall macro
#define STDCALL __attribute__((stdcall))
#else // Targeting other platforms - use the ambient calling convention
#define STDCALL
#endif
// Real names from aes.asm
extern void STDCALL KeyExpansionStdcall(const void *key_ptr, void *expanded_key_ptr, void *placeholder);
extern void STDCALL AES128EncryptOneBlockStdcall(void *output_ptr, const void *input_ptr, const void *expanded_key_ptr, void *placeholder);
// From EverCrypt.Vale.fsti
void aes128_key_expansion_sbox(uint8_t *k, uint8_t *w, uint8_t *sb)
{
KeyExpansionStdcall(k, w, sb);
}
// From EverCrypt.Vale.fsti
void aes128_encrypt_one_block(uint8_t *out, uint8_t *in, uint8_t *w, uint8_t *sb)
{
AES128EncryptOneBlockStdcall(out, in, w, sb);
}
#if !defined(_M_X64) && !defined(__x86_64__)
// On non-x64 builds, define no-op stubs for Vale assembly code to avoid
// unresolved symbols while we wait for 32-bit Vale implementations.
void __stdcall aes128_key_expansion(uint8_t *key_ptr, uint8_t *expanded_key_ptr)
{
KRML_HOST_EPRINTF("Vale aes128_key_expansion() isn't implemented in this platform. Do not call.\n");
KRML_HOST_EXIT(255);
}
void __stdcall gcm128_encrypt(void *x0)
{
KRML_HOST_EPRINTF("Vale gcm128_encrypt() isn't implemented in this platform. Do not call.\n");
KRML_HOST_EXIT(255);
}
void __stdcall gcm128_decrypt(void *x0)
{
KRML_HOST_EPRINTF("Vale gcm128_decrypt() isn't implemented in this platform. Do not call.\n");
KRML_HOST_EXIT(255);
}
void __stdcall aes256_key_expansion(uint8_t *key_ptr, uint8_t *expanded_key_ptr)
{
KRML_HOST_EPRINTF("Vale aes256_key_expansion() isn't implemented in this platform. Do not call.\n");
KRML_HOST_EXIT(255);
}
void __stdcall gcm256_encrypt(void *x0)
{
KRML_HOST_EPRINTF("Vale gcm256_encrypt() isn't implemented in this platform. Do not call.\n");
KRML_HOST_EXIT(255);
}
void __stdcall gcm256_decrypt(void *x0)
{
KRML_HOST_EPRINTF("Vale gcm256_decrypt() isn't implemented in this platform. Do not call.\n");
KRML_HOST_EXIT(255);
}
#endif

434
3rdparty/evercrypt/hacl/AEAD_Poly1305_64.c поставляемый Normal file
Просмотреть файл

@ -0,0 +1,434 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: /mnt/e/everest/verify/kremlin/krml -I /mnt/e/everest/verify/hacl-star/code/old/lib/kremlin -I /mnt/e/everest/verify/kremlin/kremlib/compat -I /mnt/e/everest/verify/hacl-star/specs -I /mnt/e/everest/verify/hacl-star/specs/old -I . -fparentheses -fcurly-braces -fno-shadow -ccopt -march=native -verbose -ldopt -flto -I ../bignum -fparentheses -skip-compilation -tmpdir poly-c -add-include "kremlib.h" -minimal -bundle AEAD.Poly1305_64=* poly-c/out.krml -o poly-c/AEAD_Poly1305_64.c
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#include "AEAD_Poly1305_64.h"
extern FStar_UInt128_uint128
FStar_UInt128_add(FStar_UInt128_uint128 x0, FStar_UInt128_uint128 x1);
extern FStar_UInt128_uint128
FStar_UInt128_add_mod(FStar_UInt128_uint128 x0, FStar_UInt128_uint128 x1);
extern FStar_UInt128_uint128
FStar_UInt128_logand(FStar_UInt128_uint128 x0, FStar_UInt128_uint128 x1);
extern FStar_UInt128_uint128
FStar_UInt128_logor(FStar_UInt128_uint128 x0, FStar_UInt128_uint128 x1);
extern FStar_UInt128_uint128 FStar_UInt128_shift_left(FStar_UInt128_uint128 x0, uint32_t x1);
extern FStar_UInt128_uint128 FStar_UInt128_shift_right(FStar_UInt128_uint128 x0, uint32_t x1);
extern FStar_UInt128_uint128 FStar_UInt128_uint64_to_uint128(uint64_t x0);
extern uint64_t FStar_UInt128_uint128_to_uint64(FStar_UInt128_uint128 x0);
extern FStar_UInt128_uint128 FStar_UInt128_mul_wide(uint64_t x0, uint64_t x1);
extern uint64_t FStar_UInt64_eq_mask(uint64_t x0, uint64_t x1);
extern uint64_t FStar_UInt64_gte_mask(uint64_t x0, uint64_t x1);
inline static void
Hacl_Bignum_Fproduct_copy_from_wide_(uint64_t *output, FStar_UInt128_uint128 *input)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)3U; i = i + (uint32_t)1U)
{
FStar_UInt128_uint128 xi = input[i];
output[i] = FStar_UInt128_uint128_to_uint64(xi);
}
}
inline static void
Hacl_Bignum_Fproduct_sum_scalar_multiplication_(
FStar_UInt128_uint128 *output,
uint64_t *input,
uint64_t s
)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)3U; i = i + (uint32_t)1U)
{
FStar_UInt128_uint128 xi = output[i];
uint64_t yi = input[i];
output[i] = FStar_UInt128_add_mod(xi, FStar_UInt128_mul_wide(yi, s));
}
}
inline static void Hacl_Bignum_Fproduct_carry_wide_(FStar_UInt128_uint128 *tmp)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)2U; i = i + (uint32_t)1U)
{
uint32_t ctr = i;
FStar_UInt128_uint128 tctr = tmp[ctr];
FStar_UInt128_uint128 tctrp1 = tmp[ctr + (uint32_t)1U];
uint64_t r0 = FStar_UInt128_uint128_to_uint64(tctr) & (uint64_t)0xfffffffffffU;
FStar_UInt128_uint128 c = FStar_UInt128_shift_right(tctr, (uint32_t)44U);
tmp[ctr] = FStar_UInt128_uint64_to_uint128(r0);
tmp[ctr + (uint32_t)1U] = FStar_UInt128_add(tctrp1, c);
}
}
inline static void Hacl_Bignum_Fproduct_carry_limb_(uint64_t *tmp)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)2U; i = i + (uint32_t)1U)
{
uint32_t ctr = i;
uint64_t tctr = tmp[ctr];
uint64_t tctrp1 = tmp[ctr + (uint32_t)1U];
uint64_t r0 = tctr & (uint64_t)0xfffffffffffU;
uint64_t c = tctr >> (uint32_t)44U;
tmp[ctr] = r0;
tmp[ctr + (uint32_t)1U] = tctrp1 + c;
}
}
inline static void Hacl_Bignum_Modulo_reduce(uint64_t *b)
{
uint64_t b0 = b[0U];
b[0U] = (b0 << (uint32_t)4U) + (b0 << (uint32_t)2U);
}
inline static void Hacl_Bignum_Modulo_carry_top(uint64_t *b)
{
uint64_t b2 = b[2U];
uint64_t b0 = b[0U];
uint64_t b2_42 = b2 >> (uint32_t)42U;
b[2U] = b2 & (uint64_t)0x3ffffffffffU;
b[0U] = (b2_42 << (uint32_t)2U) + b2_42 + b0;
}
inline static void Hacl_Bignum_Modulo_carry_top_wide(FStar_UInt128_uint128 *b)
{
FStar_UInt128_uint128 b2 = b[2U];
FStar_UInt128_uint128 b0 = b[0U];
FStar_UInt128_uint128
b2_ = FStar_UInt128_logand(b2, FStar_UInt128_uint64_to_uint128((uint64_t)0x3ffffffffffU));
uint64_t b2_42 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(b2, (uint32_t)42U));
FStar_UInt128_uint128
b0_ = FStar_UInt128_add(b0, FStar_UInt128_uint64_to_uint128((b2_42 << (uint32_t)2U) + b2_42));
b[2U] = b2_;
b[0U] = b0_;
}
inline static void Hacl_Bignum_Fmul_shift_reduce(uint64_t *output)
{
uint64_t tmp = output[2U];
for (uint32_t i = (uint32_t)0U; i < (uint32_t)2U; i = i + (uint32_t)1U)
{
uint32_t ctr = (uint32_t)3U - i - (uint32_t)1U;
uint64_t z = output[ctr - (uint32_t)1U];
output[ctr] = z;
}
output[0U] = tmp;
Hacl_Bignum_Modulo_reduce(output);
}
static void
Hacl_Bignum_Fmul_mul_shift_reduce_(
FStar_UInt128_uint128 *output,
uint64_t *input,
uint64_t *input2
)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)2U; i = i + (uint32_t)1U)
{
uint64_t input2i = input2[i];
Hacl_Bignum_Fproduct_sum_scalar_multiplication_(output, input, input2i);
Hacl_Bignum_Fmul_shift_reduce(input);
}
uint32_t i = (uint32_t)2U;
uint64_t input2i = input2[i];
Hacl_Bignum_Fproduct_sum_scalar_multiplication_(output, input, input2i);
}
inline static void Hacl_Bignum_Fmul_fmul(uint64_t *output, uint64_t *input, uint64_t *input2)
{
uint64_t tmp[3U] = { 0U };
memcpy(tmp, input, (uint32_t)3U * sizeof input[0U]);
KRML_CHECK_SIZE(sizeof (FStar_UInt128_uint128), (uint32_t)3U);
FStar_UInt128_uint128 t[3U];
for (uint32_t _i = 0U; _i < (uint32_t)3U; ++_i)
t[_i] = FStar_UInt128_uint64_to_uint128((uint64_t)0U);
Hacl_Bignum_Fmul_mul_shift_reduce_(t, tmp, input2);
Hacl_Bignum_Fproduct_carry_wide_(t);
Hacl_Bignum_Modulo_carry_top_wide(t);
Hacl_Bignum_Fproduct_copy_from_wide_(output, t);
uint64_t i0 = output[0U];
uint64_t i1 = output[1U];
uint64_t i0_ = i0 & (uint64_t)0xfffffffffffU;
uint64_t i1_ = i1 + (i0 >> (uint32_t)44U);
output[0U] = i0_;
output[1U] = i1_;
}
inline static void
Hacl_Bignum_AddAndMultiply_add_and_multiply(uint64_t *acc, uint64_t *block, uint64_t *r)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)3U; i = i + (uint32_t)1U)
{
uint64_t xi = acc[i];
uint64_t yi = block[i];
acc[i] = xi + yi;
}
Hacl_Bignum_Fmul_fmul(acc, acc, r);
}
extern FStar_UInt128_uint128 load128_le(uint8_t *x0);
extern void store128_le(uint8_t *x0, FStar_UInt128_uint128 x1);
inline static void
Hacl_Impl_Poly1305_64_poly1305_update(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *m
)
{
uint64_t *acc = st.h;
uint64_t *r = st.r;
uint64_t tmp[3U] = { 0U };
FStar_UInt128_uint128 m0 = load128_le(m);
uint64_t r0 = FStar_UInt128_uint128_to_uint64(m0) & (uint64_t)0xfffffffffffU;
uint64_t
r1 =
FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(m0, (uint32_t)44U))
& (uint64_t)0xfffffffffffU;
uint64_t r2 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(m0, (uint32_t)88U));
tmp[0U] = r0;
tmp[1U] = r1;
tmp[2U] = r2;
uint64_t b2 = tmp[2U];
uint64_t b2_ = (uint64_t)0x10000000000U | b2;
tmp[2U] = b2_;
Hacl_Bignum_AddAndMultiply_add_and_multiply(acc, tmp, r);
}
inline static void
Hacl_Impl_Poly1305_64_poly1305_process_last_block_(
uint8_t *block,
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *m,
uint64_t rem_
)
{
uint64_t tmp[3U] = { 0U };
FStar_UInt128_uint128 m0 = load128_le(block);
uint64_t r0 = FStar_UInt128_uint128_to_uint64(m0) & (uint64_t)0xfffffffffffU;
uint64_t
r1 =
FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(m0, (uint32_t)44U))
& (uint64_t)0xfffffffffffU;
uint64_t r2 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(m0, (uint32_t)88U));
tmp[0U] = r0;
tmp[1U] = r1;
tmp[2U] = r2;
Hacl_Bignum_AddAndMultiply_add_and_multiply(st.h, tmp, st.r);
}
inline static void
Hacl_Impl_Poly1305_64_poly1305_process_last_block(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *m,
uint64_t rem_
)
{
uint8_t zero1 = (uint8_t)0U;
uint8_t block[16U];
for (uint32_t _i = 0U; _i < (uint32_t)16U; ++_i)
block[_i] = zero1;
uint32_t i0 = (uint32_t)rem_;
uint32_t i = (uint32_t)rem_;
memcpy(block, m, i * sizeof m[0U]);
block[i0] = (uint8_t)1U;
Hacl_Impl_Poly1305_64_poly1305_process_last_block_(block, st, m, rem_);
}
static void Hacl_Impl_Poly1305_64_poly1305_last_pass(uint64_t *acc)
{
Hacl_Bignum_Fproduct_carry_limb_(acc);
Hacl_Bignum_Modulo_carry_top(acc);
uint64_t a0 = acc[0U];
uint64_t a10 = acc[1U];
uint64_t a20 = acc[2U];
uint64_t a0_ = a0 & (uint64_t)0xfffffffffffU;
uint64_t r0 = a0 >> (uint32_t)44U;
uint64_t a1_ = (a10 + r0) & (uint64_t)0xfffffffffffU;
uint64_t r1 = (a10 + r0) >> (uint32_t)44U;
uint64_t a2_ = a20 + r1;
acc[0U] = a0_;
acc[1U] = a1_;
acc[2U] = a2_;
Hacl_Bignum_Modulo_carry_top(acc);
uint64_t i0 = acc[0U];
uint64_t i1 = acc[1U];
uint64_t i0_ = i0 & (uint64_t)0xfffffffffffU;
uint64_t i1_ = i1 + (i0 >> (uint32_t)44U);
acc[0U] = i0_;
acc[1U] = i1_;
uint64_t a00 = acc[0U];
uint64_t a1 = acc[1U];
uint64_t a2 = acc[2U];
uint64_t mask0 = FStar_UInt64_gte_mask(a00, (uint64_t)0xffffffffffbU);
uint64_t mask1 = FStar_UInt64_eq_mask(a1, (uint64_t)0xfffffffffffU);
uint64_t mask2 = FStar_UInt64_eq_mask(a2, (uint64_t)0x3ffffffffffU);
uint64_t mask = (mask0 & mask1) & mask2;
uint64_t a0_0 = a00 - ((uint64_t)0xffffffffffbU & mask);
uint64_t a1_0 = a1 - ((uint64_t)0xfffffffffffU & mask);
uint64_t a2_0 = a2 - ((uint64_t)0x3ffffffffffU & mask);
acc[0U] = a0_0;
acc[1U] = a1_0;
acc[2U] = a2_0;
}
static Hacl_Impl_Poly1305_64_State_poly1305_state
Hacl_Impl_Poly1305_64_mk_state(uint64_t *r, uint64_t *h)
{
return ((Hacl_Impl_Poly1305_64_State_poly1305_state){ .r = r, .h = h });
}
static void
Hacl_Standalone_Poly1305_64_poly1305_blocks(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *m,
uint64_t len1
)
{
if (!(len1 == (uint64_t)0U))
{
uint8_t *block = m;
uint8_t *tail1 = m + (uint32_t)16U;
Hacl_Impl_Poly1305_64_poly1305_update(st, block);
uint64_t len2 = len1 - (uint64_t)1U;
Hacl_Standalone_Poly1305_64_poly1305_blocks(st, tail1, len2);
}
}
static void
Hacl_Standalone_Poly1305_64_poly1305_partial(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *input,
uint64_t len1,
uint8_t *kr
)
{
uint64_t *x0 = st.r;
FStar_UInt128_uint128 k1 = load128_le(kr);
FStar_UInt128_uint128
hs =
FStar_UInt128_shift_left(FStar_UInt128_uint64_to_uint128((uint64_t)0x0ffffffc0ffffffcU),
(uint32_t)64U);
FStar_UInt128_uint128 ls = FStar_UInt128_uint64_to_uint128((uint64_t)0x0ffffffc0fffffffU);
FStar_UInt128_uint128 k_clamped = FStar_UInt128_logand(k1, FStar_UInt128_logor(hs, ls));
uint64_t r0 = FStar_UInt128_uint128_to_uint64(k_clamped) & (uint64_t)0xfffffffffffU;
uint64_t
r1 =
FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(k_clamped, (uint32_t)44U))
& (uint64_t)0xfffffffffffU;
uint64_t
r2 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(k_clamped, (uint32_t)88U));
x0[0U] = r0;
x0[1U] = r1;
x0[2U] = r2;
uint64_t *x00 = st.h;
x00[0U] = (uint64_t)0U;
x00[1U] = (uint64_t)0U;
x00[2U] = (uint64_t)0U;
Hacl_Standalone_Poly1305_64_poly1305_blocks(st, input, len1);
}
Hacl_Impl_Poly1305_64_State_poly1305_state
AEAD_Poly1305_64_mk_state(uint64_t *r, uint64_t *acc)
{
return Hacl_Impl_Poly1305_64_mk_state(r, acc);
}
static void
AEAD_Poly1305_64_pad_last(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *input,
uint32_t len1
)
{
uint8_t b[16U];
if (!(len1 == (uint32_t)0U))
{
uint8_t init = (uint8_t)0U;
for (uint32_t i = (uint32_t)0U; i < (uint32_t)16U; i = i + (uint32_t)1U)
{
b[i] = init;
}
memcpy(b, input, len1 * sizeof input[0U]);
uint8_t *b0 = b;
Hacl_Impl_Poly1305_64_poly1305_update(st, b0);
}
}
void
AEAD_Poly1305_64_poly1305_blocks_init(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *input,
uint32_t len1,
uint8_t *k1
)
{
uint32_t len_16 = len1 >> (uint32_t)4U;
uint32_t rem_16 = len1 & (uint32_t)15U;
uint8_t *kr = k1;
uint32_t len_ = (uint32_t)16U * (len1 >> (uint32_t)4U);
uint8_t *part_input = input;
uint8_t *last_block = input + len_;
Hacl_Standalone_Poly1305_64_poly1305_partial(st, part_input, (uint64_t)len_16, kr);
AEAD_Poly1305_64_pad_last(st, last_block, rem_16);
}
void
AEAD_Poly1305_64_poly1305_blocks_continue(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *input,
uint32_t len1
)
{
uint32_t len_16 = len1 >> (uint32_t)4U;
uint32_t rem_16 = len1 & (uint32_t)15U;
uint32_t len_ = (uint32_t)16U * (len1 >> (uint32_t)4U);
uint8_t *part_input = input;
uint8_t *last_block = input + len_;
Hacl_Standalone_Poly1305_64_poly1305_blocks(st, part_input, (uint64_t)len_16);
AEAD_Poly1305_64_pad_last(st, last_block, rem_16);
}
void
AEAD_Poly1305_64_poly1305_blocks_finish(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *input,
uint8_t *mac,
uint8_t *key_s
)
{
Hacl_Impl_Poly1305_64_poly1305_update(st, input);
uint8_t *x2 = input + (uint32_t)16U;
if (!((uint64_t)0U == (uint64_t)0U))
{
Hacl_Impl_Poly1305_64_poly1305_process_last_block(st, x2, (uint64_t)0U);
}
uint64_t *acc = st.h;
Hacl_Impl_Poly1305_64_poly1305_last_pass(acc);
uint64_t *acc0 = st.h;
FStar_UInt128_uint128 k_ = load128_le(key_s);
uint64_t h0 = acc0[0U];
uint64_t h1 = acc0[1U];
uint64_t h2 = acc0[2U];
uint64_t accl = h1 << (uint32_t)44U | h0;
uint64_t acch = h2 << (uint32_t)24U | h1 >> (uint32_t)20U;
FStar_UInt128_uint128
acc_ =
FStar_UInt128_logor(FStar_UInt128_shift_left(FStar_UInt128_uint64_to_uint128(acch),
(uint32_t)64U),
FStar_UInt128_uint64_to_uint128(accl));
FStar_UInt128_uint128 acc_0 = acc_;
FStar_UInt128_uint128 mac_ = FStar_UInt128_add_mod(acc_0, k_);
store128_le(mac, mac_);
}

54
3rdparty/evercrypt/hacl/AEAD_Poly1305_64.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,54 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: /mnt/e/everest/verify/kremlin/krml -I /mnt/e/everest/verify/hacl-star/code/old/lib/kremlin -I /mnt/e/everest/verify/kremlin/kremlib/compat -I /mnt/e/everest/verify/hacl-star/specs -I /mnt/e/everest/verify/hacl-star/specs/old -I . -fparentheses -fcurly-braces -fno-shadow -ccopt -march=native -verbose -ldopt -flto -I ../bignum -fparentheses -skip-compilation -tmpdir poly-c -add-include "kremlib.h" -minimal -bundle AEAD.Poly1305_64=* poly-c/out.krml -o poly-c/AEAD_Poly1305_64.c
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __AEAD_Poly1305_64_H
#define __AEAD_Poly1305_64_H
#include "kremlib.h"
typedef struct Hacl_Impl_Poly1305_64_State_poly1305_state_s
{
uint64_t *r;
uint64_t *h;
}
Hacl_Impl_Poly1305_64_State_poly1305_state;
typedef uint8_t *AEAD_Poly1305_64_uint8_p;
typedef uint8_t *AEAD_Poly1305_64_key;
typedef Hacl_Impl_Poly1305_64_State_poly1305_state AEAD_Poly1305_64_state;
Hacl_Impl_Poly1305_64_State_poly1305_state
AEAD_Poly1305_64_mk_state(uint64_t *r, uint64_t *acc);
void
AEAD_Poly1305_64_poly1305_blocks_init(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *input,
uint32_t len1,
uint8_t *k1
);
void
AEAD_Poly1305_64_poly1305_blocks_continue(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *input,
uint32_t len1
);
void
AEAD_Poly1305_64_poly1305_blocks_finish(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *input,
uint8_t *mac,
uint8_t *key_s
);
#define __AEAD_Poly1305_64_H_DEFINED
#endif

3281
3rdparty/evercrypt/hacl/Hacl_AES.c поставляемый Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

64
3rdparty/evercrypt/hacl/Hacl_AES.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,64 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: /mnt/e/everest/verify/kremlin/krml -I /mnt/e/everest/verify/hacl-star/code/old/lib/kremlin -I /mnt/e/everest/verify/kremlin/kremlib/compat -I /mnt/e/everest/verify/hacl-star/specs -I /mnt/e/everest/verify/hacl-star/specs/old -I . -fparentheses -fcurly-braces -fno-shadow -ccopt -march=native -verbose -ldopt -flto -bundle Crypto.Symmetric.AES+Crypto.Symmetric.AES128=*[rename=Hacl_AES] -tmpdir aesgcm-c -minimal -add-include "kremlib.h" -skip-compilation aesgcm-c/out.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __Hacl_AES_H
#define __Hacl_AES_H
#include "kremlib.h"
typedef uint8_t *Crypto_Symmetric_AES_bytes;
typedef uint8_t *Crypto_Symmetric_AES_block;
typedef uint8_t *Crypto_Symmetric_AES_skey;
typedef uint8_t *Crypto_Symmetric_AES_xkey;
typedef uint32_t Crypto_Symmetric_AES_rnd;
typedef uint32_t Crypto_Symmetric_AES_idx_16;
typedef uint8_t *Crypto_Symmetric_AES_sbox;
void Crypto_Symmetric_AES_mk_sbox(uint8_t *sbox);
void Crypto_Symmetric_AES_mk_inv_sbox(uint8_t *sbox);
void Crypto_Symmetric_AES_cipher(uint8_t *out, uint8_t *input, uint8_t *w, uint8_t *sbox);
void Crypto_Symmetric_AES_keyExpansion(uint8_t *key, uint8_t *w, uint8_t *sbox);
void Crypto_Symmetric_AES_inv_cipher(uint8_t *out, uint8_t *input, uint8_t *w, uint8_t *sbox);
typedef uint8_t *Crypto_Symmetric_AES128_bytes;
typedef uint8_t *Crypto_Symmetric_AES128_block;
typedef uint8_t *Crypto_Symmetric_AES128_skey;
typedef uint8_t *Crypto_Symmetric_AES128_xkey;
typedef uint32_t Crypto_Symmetric_AES128_rnd;
typedef uint32_t Crypto_Symmetric_AES128_idx_16;
typedef uint8_t *Crypto_Symmetric_AES128_sbox;
void Crypto_Symmetric_AES128_mk_sbox(uint8_t *sbox);
void Crypto_Symmetric_AES128_mk_inv_sbox(uint8_t *sbox);
void Crypto_Symmetric_AES128_cipher(uint8_t *out, uint8_t *input, uint8_t *w, uint8_t *sbox);
void Crypto_Symmetric_AES128_keyExpansion(uint8_t *key, uint8_t *w, uint8_t *sbox);
void
Crypto_Symmetric_AES128_inv_cipher(uint8_t *out, uint8_t *input, uint8_t *w, uint8_t *sbox);
#define __Hacl_AES_H_DEFINED
#endif

272
3rdparty/evercrypt/hacl/Hacl_Chacha20.c поставляемый Normal file
Просмотреть файл

@ -0,0 +1,272 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: /mnt/e/everest/verify/kremlin/krml -I /mnt/e/everest/verify/hacl-star/code/old/lib/kremlin -I /mnt/e/everest/verify/kremlin/kremlib/compat -I /mnt/e/everest/verify/hacl-star/specs -I /mnt/e/everest/verify/hacl-star/specs/old -I . -fparentheses -fcurly-braces -fno-shadow -ccopt -march=native -verbose -ldopt -flto -tmpdir chacha-c -add-include "kremlib.h" -minimal -bundle Hacl.Chacha20=* -skip-compilation chacha-c/out.krml -o chacha-c/Hacl_Chacha20.c
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#include "Hacl_Chacha20.h"
static void
Hacl_Lib_LoadStore32_uint32s_from_le_bytes(uint32_t *output, uint8_t *input, uint32_t len)
{
for (uint32_t i = (uint32_t)0U; i < len; i = i + (uint32_t)1U)
{
uint8_t *x0 = input + (uint32_t)4U * i;
uint32_t inputi = load32_le(x0);
output[i] = inputi;
}
}
static void
Hacl_Lib_LoadStore32_uint32s_to_le_bytes(uint8_t *output, uint32_t *input, uint32_t len)
{
for (uint32_t i = (uint32_t)0U; i < len; i = i + (uint32_t)1U)
{
uint32_t hd1 = input[i];
uint8_t *x0 = output + (uint32_t)4U * i;
store32_le(x0, hd1);
}
}
inline static uint32_t Hacl_Impl_Chacha20_rotate_left(uint32_t a, uint32_t s)
{
return a << s | a >> ((uint32_t)32U - s);
}
inline static void Hacl_Impl_Chacha20_setup(uint32_t *st, uint8_t *k, uint8_t *n1, uint32_t c)
{
uint32_t *stcst = st;
uint32_t *stk = st + (uint32_t)4U;
uint32_t *stc = st + (uint32_t)12U;
uint32_t *stn = st + (uint32_t)13U;
stcst[0U] = (uint32_t)0x61707865U;
stcst[1U] = (uint32_t)0x3320646eU;
stcst[2U] = (uint32_t)0x79622d32U;
stcst[3U] = (uint32_t)0x6b206574U;
Hacl_Lib_LoadStore32_uint32s_from_le_bytes(stk, k, (uint32_t)8U);
stc[0U] = c;
Hacl_Lib_LoadStore32_uint32s_from_le_bytes(stn, n1, (uint32_t)3U);
}
inline static void
Hacl_Impl_Chacha20_quarter_round(uint32_t *st, uint32_t a, uint32_t b, uint32_t c, uint32_t d)
{
uint32_t sa = st[a];
uint32_t sb0 = st[b];
st[a] = sa + sb0;
uint32_t sd = st[d];
uint32_t sa10 = st[a];
uint32_t sda = sd ^ sa10;
st[d] = Hacl_Impl_Chacha20_rotate_left(sda, (uint32_t)16U);
uint32_t sa0 = st[c];
uint32_t sb1 = st[d];
st[c] = sa0 + sb1;
uint32_t sd0 = st[b];
uint32_t sa11 = st[c];
uint32_t sda0 = sd0 ^ sa11;
st[b] = Hacl_Impl_Chacha20_rotate_left(sda0, (uint32_t)12U);
uint32_t sa2 = st[a];
uint32_t sb2 = st[b];
st[a] = sa2 + sb2;
uint32_t sd1 = st[d];
uint32_t sa12 = st[a];
uint32_t sda1 = sd1 ^ sa12;
st[d] = Hacl_Impl_Chacha20_rotate_left(sda1, (uint32_t)8U);
uint32_t sa3 = st[c];
uint32_t sb = st[d];
st[c] = sa3 + sb;
uint32_t sd2 = st[b];
uint32_t sa1 = st[c];
uint32_t sda2 = sd2 ^ sa1;
st[b] = Hacl_Impl_Chacha20_rotate_left(sda2, (uint32_t)7U);
}
inline static void Hacl_Impl_Chacha20_double_round(uint32_t *st)
{
Hacl_Impl_Chacha20_quarter_round(st, (uint32_t)0U, (uint32_t)4U, (uint32_t)8U, (uint32_t)12U);
Hacl_Impl_Chacha20_quarter_round(st, (uint32_t)1U, (uint32_t)5U, (uint32_t)9U, (uint32_t)13U);
Hacl_Impl_Chacha20_quarter_round(st, (uint32_t)2U, (uint32_t)6U, (uint32_t)10U, (uint32_t)14U);
Hacl_Impl_Chacha20_quarter_round(st, (uint32_t)3U, (uint32_t)7U, (uint32_t)11U, (uint32_t)15U);
Hacl_Impl_Chacha20_quarter_round(st, (uint32_t)0U, (uint32_t)5U, (uint32_t)10U, (uint32_t)15U);
Hacl_Impl_Chacha20_quarter_round(st, (uint32_t)1U, (uint32_t)6U, (uint32_t)11U, (uint32_t)12U);
Hacl_Impl_Chacha20_quarter_round(st, (uint32_t)2U, (uint32_t)7U, (uint32_t)8U, (uint32_t)13U);
Hacl_Impl_Chacha20_quarter_round(st, (uint32_t)3U, (uint32_t)4U, (uint32_t)9U, (uint32_t)14U);
}
inline static void Hacl_Impl_Chacha20_rounds(uint32_t *st)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)10U; i = i + (uint32_t)1U)
{
Hacl_Impl_Chacha20_double_round(st);
}
}
inline static void Hacl_Impl_Chacha20_sum_states(uint32_t *st, uint32_t *st_)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)16U; i = i + (uint32_t)1U)
{
uint32_t xi = st[i];
uint32_t yi = st_[i];
st[i] = xi + yi;
}
}
inline static void Hacl_Impl_Chacha20_copy_state(uint32_t *st, uint32_t *st_)
{
memcpy(st, st_, (uint32_t)16U * sizeof st_[0U]);
}
inline static void Hacl_Impl_Chacha20_chacha20_core(uint32_t *k, uint32_t *st, uint32_t ctr)
{
st[12U] = ctr;
Hacl_Impl_Chacha20_copy_state(k, st);
Hacl_Impl_Chacha20_rounds(k);
Hacl_Impl_Chacha20_sum_states(k, st);
}
inline static void
Hacl_Impl_Chacha20_chacha20_block(uint8_t *stream_block, uint32_t *st, uint32_t ctr)
{
uint32_t st_[16U] = { 0U };
Hacl_Impl_Chacha20_chacha20_core(st_, st, ctr);
Hacl_Lib_LoadStore32_uint32s_to_le_bytes(stream_block, st_, (uint32_t)16U);
}
inline static void Hacl_Impl_Chacha20_init(uint32_t *st, uint8_t *k, uint8_t *n1)
{
Hacl_Impl_Chacha20_setup(st, k, n1, (uint32_t)0U);
}
static void
Hacl_Impl_Chacha20_update(uint8_t *output, uint8_t *plain, uint32_t *st, uint32_t ctr)
{
uint32_t b[48U] = { 0U };
uint32_t *k = b;
uint32_t *ib = b + (uint32_t)16U;
uint32_t *ob = b + (uint32_t)32U;
Hacl_Impl_Chacha20_chacha20_core(k, st, ctr);
Hacl_Lib_LoadStore32_uint32s_from_le_bytes(ib, plain, (uint32_t)16U);
for (uint32_t i = (uint32_t)0U; i < (uint32_t)16U; i = i + (uint32_t)1U)
{
uint32_t xi = ib[i];
uint32_t yi = k[i];
ob[i] = xi ^ yi;
}
Hacl_Lib_LoadStore32_uint32s_to_le_bytes(output, ob, (uint32_t)16U);
}
static void
Hacl_Impl_Chacha20_update_last(
uint8_t *output,
uint8_t *plain,
uint32_t len,
uint32_t *st,
uint32_t ctr
)
{
uint8_t block[64U] = { 0U };
Hacl_Impl_Chacha20_chacha20_block(block, st, ctr);
uint8_t *mask = block;
for (uint32_t i = (uint32_t)0U; i < len; i = i + (uint32_t)1U)
{
uint8_t xi = plain[i];
uint8_t yi = mask[i];
output[i] = xi ^ yi;
}
}
static void
Hacl_Impl_Chacha20_chacha20_counter_mode_blocks(
uint8_t *output,
uint8_t *plain,
uint32_t num_blocks,
uint32_t *st,
uint32_t ctr
)
{
for (uint32_t i = (uint32_t)0U; i < num_blocks; i = i + (uint32_t)1U)
{
uint8_t *b = plain + (uint32_t)64U * i;
uint8_t *o = output + (uint32_t)64U * i;
Hacl_Impl_Chacha20_update(o, b, st, ctr + i);
}
}
static void
Hacl_Impl_Chacha20_chacha20_counter_mode(
uint8_t *output,
uint8_t *plain,
uint32_t len,
uint32_t *st,
uint32_t ctr
)
{
uint32_t blocks_len = len >> (uint32_t)6U;
uint32_t part_len = len & (uint32_t)0x3fU;
uint8_t *output_ = output;
uint8_t *plain_ = plain;
uint8_t *output__ = output + (uint32_t)64U * blocks_len;
uint8_t *plain__ = plain + (uint32_t)64U * blocks_len;
Hacl_Impl_Chacha20_chacha20_counter_mode_blocks(output_, plain_, blocks_len, st, ctr);
if (part_len > (uint32_t)0U)
{
Hacl_Impl_Chacha20_update_last(output__, plain__, part_len, st, ctr + blocks_len);
}
}
static void
Hacl_Impl_Chacha20_chacha20(
uint8_t *output,
uint8_t *plain,
uint32_t len,
uint8_t *k,
uint8_t *n1,
uint32_t ctr
)
{
uint32_t st[16U] = { 0U };
Hacl_Impl_Chacha20_init(st, k, n1);
Hacl_Impl_Chacha20_chacha20_counter_mode(output, plain, len, st, ctr);
}
void Hacl_Chacha20_chacha20_key_block(uint8_t *block, uint8_t *k, uint8_t *n1, uint32_t ctr)
{
uint32_t st[16U] = { 0U };
Hacl_Impl_Chacha20_init(st, k, n1);
Hacl_Impl_Chacha20_chacha20_block(block, st, ctr);
}
/*
This function implements Chacha20
val chacha20 :
output: uint8_p ->
plain: uint8_p{disjoint output plain} ->
len: uint32_t{v len = length output /\ v len = length plain} ->
key: uint8_p{length key = 32} ->
nonce: uint8_p{length nonce = 12} ->
ctr: uint32_t{v ctr + (length plain / 64) < pow2 32}
-> Stack unit
(requires
(fun h -> live h output /\ live h plain /\ live h nonce /\ live h key))
(ensures
(fun h0 _ h1 ->
live h1 output /\ live h0 plain /\ modifies_1 output h0 h1 /\
live h0 nonce /\ live h0 key /\
h1.[ output ] ==
chacha20_encrypt_bytes h0.[ key ] h0.[ nonce ] (v ctr) h0.[ plain ])
)
*/
void
Hacl_Chacha20_chacha20(
uint8_t *output,
uint8_t *plain,
uint32_t len,
uint8_t *k,
uint8_t *n1,
uint32_t ctr
)
{
Hacl_Impl_Chacha20_chacha20(output, plain, len, k, n1, ctr);
}

52
3rdparty/evercrypt/hacl/Hacl_Chacha20.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,52 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: /mnt/e/everest/verify/kremlin/krml -I /mnt/e/everest/verify/hacl-star/code/old/lib/kremlin -I /mnt/e/everest/verify/kremlin/kremlib/compat -I /mnt/e/everest/verify/hacl-star/specs -I /mnt/e/everest/verify/hacl-star/specs/old -I . -fparentheses -fcurly-braces -fno-shadow -ccopt -march=native -verbose -ldopt -flto -tmpdir chacha-c -add-include "kremlib.h" -minimal -bundle Hacl.Chacha20=* -skip-compilation chacha-c/out.krml -o chacha-c/Hacl_Chacha20.c
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __Hacl_Chacha20_H
#define __Hacl_Chacha20_H
#include "kremlib.h"
typedef uint8_t *Hacl_Chacha20_uint8_p;
typedef uint32_t Hacl_Chacha20_uint32_t;
void Hacl_Chacha20_chacha20_key_block(uint8_t *block, uint8_t *k, uint8_t *n1, uint32_t ctr);
/*
This function implements Chacha20
val chacha20 :
output: uint8_p ->
plain: uint8_p{disjoint output plain} ->
len: uint32_t{v len = length output /\ v len = length plain} ->
key: uint8_p{length key = 32} ->
nonce: uint8_p{length nonce = 12} ->
ctr: uint32_t{v ctr + (length plain / 64) < pow2 32}
-> Stack unit
(requires
(fun h -> live h output /\ live h plain /\ live h nonce /\ live h key))
(ensures
(fun h0 _ h1 ->
live h1 output /\ live h0 plain /\ modifies_1 output h0 h1 /\
live h0 nonce /\ live h0 key /\
h1.[ output ] ==
chacha20_encrypt_bytes h0.[ key ] h0.[ nonce ] (v ctr) h0.[ plain ])
)
*/
void
Hacl_Chacha20_chacha20(
uint8_t *output,
uint8_t *plain,
uint32_t len,
uint8_t *k,
uint8_t *n1,
uint32_t ctr
);
#define __Hacl_Chacha20_H_DEFINED
#endif

169
3rdparty/evercrypt/hacl/Hacl_Chacha20Poly1305.c поставляемый Normal file
Просмотреть файл

@ -0,0 +1,169 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: /mnt/e/everest/verify/kremlin/krml -I /mnt/e/everest/verify/hacl-star/code/old/lib/kremlin -I /mnt/e/everest/verify/kremlin/kremlib/compat -I /mnt/e/everest/verify/hacl-star/specs -I /mnt/e/everest/verify/hacl-star/specs/old -I . -fparentheses -fcurly-braces -fno-shadow -ccopt -march=native -verbose -ldopt -flto -I ../salsa-family -I /mnt/e/everest/verify/hacl-star/code/old/bignum -I ../curve25519 -I ../curve25519/interfaces -I ../poly1305 -I ../hash -drop Prims,LowStar,C.Loops.Spec.Loops,Spec.*,Hacl.Spec.*,Hacl.Spe.*,Hacl.Impl.*,Seq.*,Hacl.Constants,Hacl.Endianness -drop Hacl.UInt8,Hacl.UInt32,Hacl.UInt64,Hacl.UInt128,Hacl.Cast,Hacl.UInt16,Hacl.Types -I interfaces -tmpdir aead-c Hacl.Chacha20Poly1305.fst -skip-compilation -add-include "Hacl_Chacha20.h" -add-include "AEAD_Poly1305_64.h" -minimal -add-include "kremlib.h" -bundle Hacl.Chacha20Poly1305=*
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#include "Hacl_Chacha20Poly1305.h"
extern uint8_t FStar_UInt8_eq_mask(uint8_t x0, uint8_t x1);
static uint8_t Hacl_Policies_cmp_bytes_(uint8_t *b1, uint8_t *b2, uint32_t len1, uint8_t *tmp)
{
for (uint32_t i = (uint32_t)0U; i < len1; i = i + (uint32_t)1U)
{
uint8_t bi1 = b1[i];
uint8_t bi2 = b2[i];
uint8_t z0 = tmp[0U];
tmp[0U] = FStar_UInt8_eq_mask(bi1, bi2) & z0;
}
return tmp[0U];
}
static uint8_t Hacl_Policies_cmp_bytes(uint8_t *b1, uint8_t *b2, uint32_t len1)
{
uint8_t tmp = (uint8_t)255U;
uint8_t z = Hacl_Policies_cmp_bytes_(b1, b2, len1, &tmp);
return ~z;
}
extern void
Hacl_Chacha20_chacha20_key_block(uint8_t *x0, uint8_t *x1, uint8_t *x2, uint32_t x3);
extern void
Hacl_Chacha20_chacha20(
uint8_t *x0,
uint8_t *x1,
uint32_t x2,
uint8_t *x3,
uint8_t *x4,
uint32_t x5
);
extern Hacl_Impl_Poly1305_64_State_poly1305_state
AEAD_Poly1305_64_mk_state(uint64_t *x0, uint64_t *x1);
extern void
AEAD_Poly1305_64_poly1305_blocks_init(
Hacl_Impl_Poly1305_64_State_poly1305_state x0,
uint8_t *x1,
uint32_t x2,
uint8_t *x3
);
extern void
AEAD_Poly1305_64_poly1305_blocks_continue(
Hacl_Impl_Poly1305_64_State_poly1305_state x0,
uint8_t *x1,
uint32_t x2
);
extern void
AEAD_Poly1305_64_poly1305_blocks_finish(
Hacl_Impl_Poly1305_64_State_poly1305_state x0,
uint8_t *x1,
uint8_t *x2,
uint8_t *x3
);
static void
Hacl_Chacha20Poly1305_aead_encrypt_poly(
uint8_t *c,
uint32_t mlen,
uint8_t *mac,
uint8_t *aad1,
uint32_t aadlen,
uint8_t *tmp
)
{
uint8_t *b = tmp;
uint8_t *lb = tmp + (uint32_t)64U;
uint8_t *mk = b;
uint8_t *key_s = mk + (uint32_t)16U;
uint64_t tmp1[6U] = { 0U };
Hacl_Impl_Poly1305_64_State_poly1305_state
st = AEAD_Poly1305_64_mk_state(tmp1, tmp1 + (uint32_t)3U);
AEAD_Poly1305_64_poly1305_blocks_init(st, aad1, aadlen, mk);
AEAD_Poly1305_64_poly1305_blocks_continue(st, c, mlen);
AEAD_Poly1305_64_poly1305_blocks_finish(st, lb, mac, key_s);
}
void Hacl_Chacha20Poly1305_encode_length(uint8_t *lb, uint32_t aad_len, uint32_t mlen)
{
store64_le(lb, (uint64_t)aad_len);
uint8_t *x0 = lb + (uint32_t)8U;
store64_le(x0, (uint64_t)mlen);
}
static uint32_t
Hacl_Chacha20Poly1305_aead_encrypt_(
uint8_t *c,
uint8_t *mac,
uint8_t *m,
uint32_t mlen,
uint8_t *aad1,
uint32_t aadlen,
uint8_t *k1,
uint8_t *n1
)
{
uint8_t tmp[80U] = { 0U };
uint8_t *b = tmp;
uint8_t *lb = tmp + (uint32_t)64U;
Hacl_Chacha20Poly1305_encode_length(lb, aadlen, mlen);
Hacl_Chacha20_chacha20(c, m, mlen, k1, n1, (uint32_t)1U);
Hacl_Chacha20_chacha20_key_block(b, k1, n1, (uint32_t)0U);
Hacl_Chacha20Poly1305_aead_encrypt_poly(c, mlen, mac, aad1, aadlen, tmp);
return (uint32_t)0U;
}
uint32_t
Hacl_Chacha20Poly1305_aead_encrypt(
uint8_t *c,
uint8_t *mac,
uint8_t *m,
uint32_t mlen,
uint8_t *aad1,
uint32_t aadlen,
uint8_t *k1,
uint8_t *n1
)
{
uint32_t z = Hacl_Chacha20Poly1305_aead_encrypt_(c, mac, m, mlen, aad1, aadlen, k1, n1);
return z;
}
uint32_t
Hacl_Chacha20Poly1305_aead_decrypt(
uint8_t *m,
uint8_t *c,
uint32_t mlen,
uint8_t *mac,
uint8_t *aad1,
uint32_t aadlen,
uint8_t *k1,
uint8_t *n1
)
{
uint8_t tmp[96U] = { 0U };
uint8_t *b = tmp;
uint8_t *lb = tmp + (uint32_t)64U;
Hacl_Chacha20Poly1305_encode_length(lb, aadlen, mlen);
uint8_t *rmac = tmp + (uint32_t)80U;
Hacl_Chacha20_chacha20_key_block(b, k1, n1, (uint32_t)0U);
Hacl_Chacha20Poly1305_aead_encrypt_poly(c, mlen, rmac, aad1, aadlen, tmp);
uint8_t result = Hacl_Policies_cmp_bytes(mac, rmac, (uint32_t)16U);
uint8_t verify = result;
uint32_t res;
if (verify == (uint8_t)0U)
{
Hacl_Chacha20_chacha20(m, c, mlen, k1, n1, (uint32_t)1U);
res = (uint32_t)0U;
}
else
{
res = (uint32_t)1U;
}
return res;
}

47
3rdparty/evercrypt/hacl/Hacl_Chacha20Poly1305.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,47 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: /mnt/e/everest/verify/kremlin/krml -I /mnt/e/everest/verify/hacl-star/code/old/lib/kremlin -I /mnt/e/everest/verify/kremlin/kremlib/compat -I /mnt/e/everest/verify/hacl-star/specs -I /mnt/e/everest/verify/hacl-star/specs/old -I . -fparentheses -fcurly-braces -fno-shadow -ccopt -march=native -verbose -ldopt -flto -I ../salsa-family -I /mnt/e/everest/verify/hacl-star/code/old/bignum -I ../curve25519 -I ../curve25519/interfaces -I ../poly1305 -I ../hash -drop Prims,LowStar,C.Loops.Spec.Loops,Spec.*,Hacl.Spec.*,Hacl.Spe.*,Hacl.Impl.*,Seq.*,Hacl.Constants,Hacl.Endianness -drop Hacl.UInt8,Hacl.UInt32,Hacl.UInt64,Hacl.UInt128,Hacl.Cast,Hacl.UInt16,Hacl.Types -I interfaces -tmpdir aead-c Hacl.Chacha20Poly1305.fst -skip-compilation -add-include "Hacl_Chacha20.h" -add-include "AEAD_Poly1305_64.h" -minimal -add-include "kremlib.h" -bundle Hacl.Chacha20Poly1305=*
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __Hacl_Chacha20Poly1305_H
#define __Hacl_Chacha20Poly1305_H
#include "Hacl_Chacha20.h"
#include "AEAD_Poly1305_64.h"
#include "kremlib.h"
typedef Hacl_Impl_Poly1305_64_State_poly1305_state Hacl_Chacha20Poly1305_state;
typedef void *Hacl_Chacha20Poly1305_log_t;
void Hacl_Chacha20Poly1305_encode_length(uint8_t *lb, uint32_t aad_len, uint32_t mlen);
uint32_t
Hacl_Chacha20Poly1305_aead_encrypt(
uint8_t *c,
uint8_t *mac,
uint8_t *m,
uint32_t mlen,
uint8_t *aad1,
uint32_t aadlen,
uint8_t *k1,
uint8_t *n1
);
uint32_t
Hacl_Chacha20Poly1305_aead_decrypt(
uint8_t *m,
uint8_t *c,
uint32_t mlen,
uint8_t *mac,
uint8_t *aad1,
uint32_t aadlen,
uint8_t *k1,
uint8_t *n1
);
#define __Hacl_Chacha20Poly1305_H_DEFINED
#endif

704
3rdparty/evercrypt/hacl/Hacl_Curve25519.c поставляемый Normal file
Просмотреть файл

@ -0,0 +1,704 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: /mnt/e/everest/verify/kremlin/krml -tmpdir x25519-c -I /mnt/e/everest/verify/hacl-star/code/old/lib/kremlin -I /mnt/e/everest/verify/kremlin/kremlib/compat -I /mnt/e/everest/verify/hacl-star/specs -I /mnt/e/everest/verify/hacl-star/specs/old -I . -fparentheses -fcurly-braces -fno-shadow -ccopt -march=native -verbose -ldopt -flto -I ../bignum -bundle Hacl.Curve25519=* -minimal -add-include "kremlib.h" -skip-compilation x25519-c/out.krml -o x25519-c/Hacl_Curve25519.c
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#include "Hacl_Curve25519.h"
extern FStar_UInt128_uint128
FStar_UInt128_add(FStar_UInt128_uint128 x0, FStar_UInt128_uint128 x1);
extern FStar_UInt128_uint128
FStar_UInt128_add_mod(FStar_UInt128_uint128 x0, FStar_UInt128_uint128 x1);
extern FStar_UInt128_uint128
FStar_UInt128_logand(FStar_UInt128_uint128 x0, FStar_UInt128_uint128 x1);
extern FStar_UInt128_uint128 FStar_UInt128_shift_right(FStar_UInt128_uint128 x0, uint32_t x1);
extern FStar_UInt128_uint128 FStar_UInt128_uint64_to_uint128(uint64_t x0);
extern uint64_t FStar_UInt128_uint128_to_uint64(FStar_UInt128_uint128 x0);
extern FStar_UInt128_uint128 FStar_UInt128_mul_wide(uint64_t x0, uint64_t x1);
extern uint64_t FStar_UInt64_eq_mask(uint64_t x0, uint64_t x1);
extern uint64_t FStar_UInt64_gte_mask(uint64_t x0, uint64_t x1);
inline static void
Hacl_Bignum_Fproduct_copy_from_wide_(uint64_t *output, FStar_UInt128_uint128 *input)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)5U; i = i + (uint32_t)1U)
{
FStar_UInt128_uint128 xi = input[i];
output[i] = FStar_UInt128_uint128_to_uint64(xi);
}
}
inline static void
Hacl_Bignum_Fproduct_sum_scalar_multiplication_(
FStar_UInt128_uint128 *output,
uint64_t *input,
uint64_t s
)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)5U; i = i + (uint32_t)1U)
{
FStar_UInt128_uint128 xi = output[i];
uint64_t yi = input[i];
output[i] = FStar_UInt128_add_mod(xi, FStar_UInt128_mul_wide(yi, s));
}
}
inline static void Hacl_Bignum_Fproduct_carry_wide_(FStar_UInt128_uint128 *tmp)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)4U; i = i + (uint32_t)1U)
{
uint32_t ctr = i;
FStar_UInt128_uint128 tctr = tmp[ctr];
FStar_UInt128_uint128 tctrp1 = tmp[ctr + (uint32_t)1U];
uint64_t r0 = FStar_UInt128_uint128_to_uint64(tctr) & (uint64_t)0x7ffffffffffffU;
FStar_UInt128_uint128 c = FStar_UInt128_shift_right(tctr, (uint32_t)51U);
tmp[ctr] = FStar_UInt128_uint64_to_uint128(r0);
tmp[ctr + (uint32_t)1U] = FStar_UInt128_add(tctrp1, c);
}
}
static void
Hacl_EC_Point_swap_conditional_step(uint64_t *a, uint64_t *b, uint64_t swap1, uint32_t ctr)
{
uint32_t i = ctr - (uint32_t)1U;
uint64_t ai = a[i];
uint64_t bi = b[i];
uint64_t x = swap1 & (ai ^ bi);
uint64_t ai1 = ai ^ x;
uint64_t bi1 = bi ^ x;
a[i] = ai1;
b[i] = bi1;
}
static void
Hacl_EC_Point_swap_conditional_(uint64_t *a, uint64_t *b, uint64_t swap1, uint32_t ctr)
{
if (!(ctr == (uint32_t)0U))
{
Hacl_EC_Point_swap_conditional_step(a, b, swap1, ctr);
uint32_t i = ctr - (uint32_t)1U;
Hacl_EC_Point_swap_conditional_(a, b, swap1, i);
}
}
static void Hacl_EC_Point_swap_conditional(uint64_t *a, uint64_t *b, uint64_t iswap)
{
uint64_t swap1 = (uint64_t)0U - iswap;
Hacl_EC_Point_swap_conditional_(a, b, swap1, (uint32_t)5U);
Hacl_EC_Point_swap_conditional_(a + (uint32_t)5U, b + (uint32_t)5U, swap1, (uint32_t)5U);
}
static void Hacl_EC_Point_copy(uint64_t *output, uint64_t *input)
{
memcpy(output, input, (uint32_t)5U * sizeof input[0U]);
memcpy(output + (uint32_t)5U,
input + (uint32_t)5U,
(uint32_t)5U * sizeof (input + (uint32_t)5U)[0U]);
}
static void Hacl_Bignum_Modulo_carry_top(uint64_t *b)
{
uint64_t b4 = b[4U];
uint64_t b0 = b[0U];
uint64_t b4_ = b4 & (uint64_t)0x7ffffffffffffU;
uint64_t b0_ = b0 + (uint64_t)19U * (b4 >> (uint32_t)51U);
b[4U] = b4_;
b[0U] = b0_;
}
inline static void Hacl_Bignum_Fmul_shift_reduce(uint64_t *output)
{
uint64_t tmp = output[4U];
for (uint32_t i = (uint32_t)0U; i < (uint32_t)4U; i = i + (uint32_t)1U)
{
uint32_t ctr = (uint32_t)5U - i - (uint32_t)1U;
uint64_t z = output[ctr - (uint32_t)1U];
output[ctr] = z;
}
output[0U] = tmp;
uint64_t b0 = output[0U];
output[0U] = (uint64_t)19U * b0;
}
static void
Hacl_Bignum_Fmul_mul_shift_reduce_(
FStar_UInt128_uint128 *output,
uint64_t *input,
uint64_t *input2
)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)4U; i = i + (uint32_t)1U)
{
uint64_t input2i = input2[i];
Hacl_Bignum_Fproduct_sum_scalar_multiplication_(output, input, input2i);
Hacl_Bignum_Fmul_shift_reduce(input);
}
uint32_t i = (uint32_t)4U;
uint64_t input2i = input2[i];
Hacl_Bignum_Fproduct_sum_scalar_multiplication_(output, input, input2i);
}
inline static void Hacl_Bignum_Fmul_fmul(uint64_t *output, uint64_t *input, uint64_t *input2)
{
uint64_t tmp[5U] = { 0U };
memcpy(tmp, input, (uint32_t)5U * sizeof input[0U]);
KRML_CHECK_SIZE(sizeof (FStar_UInt128_uint128), (uint32_t)5U);
FStar_UInt128_uint128 t[5U];
for (uint32_t _i = 0U; _i < (uint32_t)5U; ++_i)
t[_i] = FStar_UInt128_uint64_to_uint128((uint64_t)0U);
Hacl_Bignum_Fmul_mul_shift_reduce_(t, tmp, input2);
Hacl_Bignum_Fproduct_carry_wide_(t);
FStar_UInt128_uint128 b4 = t[4U];
FStar_UInt128_uint128 b0 = t[0U];
FStar_UInt128_uint128
b4_ = FStar_UInt128_logand(b4, FStar_UInt128_uint64_to_uint128((uint64_t)0x7ffffffffffffU));
FStar_UInt128_uint128
b0_ =
FStar_UInt128_add(b0,
FStar_UInt128_mul_wide((uint64_t)19U,
FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(b4, (uint32_t)51U))));
t[4U] = b4_;
t[0U] = b0_;
Hacl_Bignum_Fproduct_copy_from_wide_(output, t);
uint64_t i0 = output[0U];
uint64_t i1 = output[1U];
uint64_t i0_ = i0 & (uint64_t)0x7ffffffffffffU;
uint64_t i1_ = i1 + (i0 >> (uint32_t)51U);
output[0U] = i0_;
output[1U] = i1_;
}
inline static void Hacl_Bignum_Fsquare_fsquare__(FStar_UInt128_uint128 *tmp, uint64_t *output)
{
uint64_t r0 = output[0U];
uint64_t r1 = output[1U];
uint64_t r2 = output[2U];
uint64_t r3 = output[3U];
uint64_t r4 = output[4U];
uint64_t d0 = r0 * (uint64_t)2U;
uint64_t d1 = r1 * (uint64_t)2U;
uint64_t d2 = r2 * (uint64_t)2U * (uint64_t)19U;
uint64_t d419 = r4 * (uint64_t)19U;
uint64_t d4 = d419 * (uint64_t)2U;
FStar_UInt128_uint128
s0 =
FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(r0, r0),
FStar_UInt128_mul_wide(d4, r1)),
FStar_UInt128_mul_wide(d2, r3));
FStar_UInt128_uint128
s1 =
FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d0, r1),
FStar_UInt128_mul_wide(d4, r2)),
FStar_UInt128_mul_wide(r3 * (uint64_t)19U, r3));
FStar_UInt128_uint128
s2 =
FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d0, r2),
FStar_UInt128_mul_wide(r1, r1)),
FStar_UInt128_mul_wide(d4, r3));
FStar_UInt128_uint128
s3 =
FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d0, r3),
FStar_UInt128_mul_wide(d1, r2)),
FStar_UInt128_mul_wide(r4, d419));
FStar_UInt128_uint128
s4 =
FStar_UInt128_add(FStar_UInt128_add(FStar_UInt128_mul_wide(d0, r4),
FStar_UInt128_mul_wide(d1, r3)),
FStar_UInt128_mul_wide(r2, r2));
tmp[0U] = s0;
tmp[1U] = s1;
tmp[2U] = s2;
tmp[3U] = s3;
tmp[4U] = s4;
}
inline static void Hacl_Bignum_Fsquare_fsquare_(FStar_UInt128_uint128 *tmp, uint64_t *output)
{
Hacl_Bignum_Fsquare_fsquare__(tmp, output);
Hacl_Bignum_Fproduct_carry_wide_(tmp);
FStar_UInt128_uint128 b4 = tmp[4U];
FStar_UInt128_uint128 b0 = tmp[0U];
FStar_UInt128_uint128
b4_ = FStar_UInt128_logand(b4, FStar_UInt128_uint64_to_uint128((uint64_t)0x7ffffffffffffU));
FStar_UInt128_uint128
b0_ =
FStar_UInt128_add(b0,
FStar_UInt128_mul_wide((uint64_t)19U,
FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(b4, (uint32_t)51U))));
tmp[4U] = b4_;
tmp[0U] = b0_;
Hacl_Bignum_Fproduct_copy_from_wide_(output, tmp);
uint64_t i0 = output[0U];
uint64_t i1 = output[1U];
uint64_t i0_ = i0 & (uint64_t)0x7ffffffffffffU;
uint64_t i1_ = i1 + (i0 >> (uint32_t)51U);
output[0U] = i0_;
output[1U] = i1_;
}
static void
Hacl_Bignum_Fsquare_fsquare_times_(
uint64_t *input,
FStar_UInt128_uint128 *tmp,
uint32_t count1
)
{
Hacl_Bignum_Fsquare_fsquare_(tmp, input);
for (uint32_t i = (uint32_t)1U; i < count1; i = i + (uint32_t)1U)
{
Hacl_Bignum_Fsquare_fsquare_(tmp, input);
}
}
inline static void
Hacl_Bignum_Fsquare_fsquare_times(uint64_t *output, uint64_t *input, uint32_t count1)
{
KRML_CHECK_SIZE(sizeof (FStar_UInt128_uint128), (uint32_t)5U);
FStar_UInt128_uint128 t[5U];
for (uint32_t _i = 0U; _i < (uint32_t)5U; ++_i)
t[_i] = FStar_UInt128_uint64_to_uint128((uint64_t)0U);
memcpy(output, input, (uint32_t)5U * sizeof input[0U]);
Hacl_Bignum_Fsquare_fsquare_times_(output, t, count1);
}
inline static void Hacl_Bignum_Fsquare_fsquare_times_inplace(uint64_t *output, uint32_t count1)
{
KRML_CHECK_SIZE(sizeof (FStar_UInt128_uint128), (uint32_t)5U);
FStar_UInt128_uint128 t[5U];
for (uint32_t _i = 0U; _i < (uint32_t)5U; ++_i)
t[_i] = FStar_UInt128_uint64_to_uint128((uint64_t)0U);
Hacl_Bignum_Fsquare_fsquare_times_(output, t, count1);
}
inline static void Hacl_Bignum_Crecip_crecip(uint64_t *out, uint64_t *z)
{
uint64_t buf[20U] = { 0U };
uint64_t *a = buf;
uint64_t *t00 = buf + (uint32_t)5U;
uint64_t *b0 = buf + (uint32_t)10U;
Hacl_Bignum_Fsquare_fsquare_times(a, z, (uint32_t)1U);
Hacl_Bignum_Fsquare_fsquare_times(t00, a, (uint32_t)2U);
Hacl_Bignum_Fmul_fmul(b0, t00, z);
Hacl_Bignum_Fmul_fmul(a, b0, a);
Hacl_Bignum_Fsquare_fsquare_times(t00, a, (uint32_t)1U);
Hacl_Bignum_Fmul_fmul(b0, t00, b0);
Hacl_Bignum_Fsquare_fsquare_times(t00, b0, (uint32_t)5U);
uint64_t *t01 = buf + (uint32_t)5U;
uint64_t *b1 = buf + (uint32_t)10U;
uint64_t *c0 = buf + (uint32_t)15U;
Hacl_Bignum_Fmul_fmul(b1, t01, b1);
Hacl_Bignum_Fsquare_fsquare_times(t01, b1, (uint32_t)10U);
Hacl_Bignum_Fmul_fmul(c0, t01, b1);
Hacl_Bignum_Fsquare_fsquare_times(t01, c0, (uint32_t)20U);
Hacl_Bignum_Fmul_fmul(t01, t01, c0);
Hacl_Bignum_Fsquare_fsquare_times_inplace(t01, (uint32_t)10U);
Hacl_Bignum_Fmul_fmul(b1, t01, b1);
Hacl_Bignum_Fsquare_fsquare_times(t01, b1, (uint32_t)50U);
uint64_t *a0 = buf;
uint64_t *t0 = buf + (uint32_t)5U;
uint64_t *b = buf + (uint32_t)10U;
uint64_t *c = buf + (uint32_t)15U;
Hacl_Bignum_Fmul_fmul(c, t0, b);
Hacl_Bignum_Fsquare_fsquare_times(t0, c, (uint32_t)100U);
Hacl_Bignum_Fmul_fmul(t0, t0, c);
Hacl_Bignum_Fsquare_fsquare_times_inplace(t0, (uint32_t)50U);
Hacl_Bignum_Fmul_fmul(t0, t0, b);
Hacl_Bignum_Fsquare_fsquare_times_inplace(t0, (uint32_t)5U);
Hacl_Bignum_Fmul_fmul(out, t0, a0);
}
inline static void Hacl_Bignum_fsum(uint64_t *a, uint64_t *b)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)5U; i = i + (uint32_t)1U)
{
uint64_t xi = a[i];
uint64_t yi = b[i];
a[i] = xi + yi;
}
}
inline static void Hacl_Bignum_fdifference(uint64_t *a, uint64_t *b)
{
uint64_t tmp[5U] = { 0U };
memcpy(tmp, b, (uint32_t)5U * sizeof b[0U]);
uint64_t b0 = tmp[0U];
uint64_t b1 = tmp[1U];
uint64_t b2 = tmp[2U];
uint64_t b3 = tmp[3U];
uint64_t b4 = tmp[4U];
tmp[0U] = b0 + (uint64_t)0x3fffffffffff68U;
tmp[1U] = b1 + (uint64_t)0x3ffffffffffff8U;
tmp[2U] = b2 + (uint64_t)0x3ffffffffffff8U;
tmp[3U] = b3 + (uint64_t)0x3ffffffffffff8U;
tmp[4U] = b4 + (uint64_t)0x3ffffffffffff8U;
for (uint32_t i = (uint32_t)0U; i < (uint32_t)5U; i = i + (uint32_t)1U)
{
uint64_t xi = a[i];
uint64_t yi = tmp[i];
a[i] = yi - xi;
}
}
inline static void Hacl_Bignum_fscalar(uint64_t *output, uint64_t *b, uint64_t s)
{
KRML_CHECK_SIZE(sizeof (FStar_UInt128_uint128), (uint32_t)5U);
FStar_UInt128_uint128 tmp[5U];
for (uint32_t _i = 0U; _i < (uint32_t)5U; ++_i)
tmp[_i] = FStar_UInt128_uint64_to_uint128((uint64_t)0U);
for (uint32_t i = (uint32_t)0U; i < (uint32_t)5U; i = i + (uint32_t)1U)
{
uint64_t xi = b[i];
tmp[i] = FStar_UInt128_mul_wide(xi, s);
}
Hacl_Bignum_Fproduct_carry_wide_(tmp);
FStar_UInt128_uint128 b4 = tmp[4U];
FStar_UInt128_uint128 b0 = tmp[0U];
FStar_UInt128_uint128
b4_ = FStar_UInt128_logand(b4, FStar_UInt128_uint64_to_uint128((uint64_t)0x7ffffffffffffU));
FStar_UInt128_uint128
b0_ =
FStar_UInt128_add(b0,
FStar_UInt128_mul_wide((uint64_t)19U,
FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(b4, (uint32_t)51U))));
tmp[4U] = b4_;
tmp[0U] = b0_;
Hacl_Bignum_Fproduct_copy_from_wide_(output, tmp);
}
inline static void Hacl_Bignum_fmul(uint64_t *output, uint64_t *a, uint64_t *b)
{
Hacl_Bignum_Fmul_fmul(output, a, b);
}
inline static void Hacl_Bignum_crecip(uint64_t *output, uint64_t *input)
{
Hacl_Bignum_Crecip_crecip(output, input);
}
static void Hacl_EC_Format_fexpand(uint64_t *output, uint8_t *input)
{
uint64_t i0 = load64_le(input);
uint8_t *x00 = input + (uint32_t)6U;
uint64_t i1 = load64_le(x00);
uint8_t *x01 = input + (uint32_t)12U;
uint64_t i2 = load64_le(x01);
uint8_t *x02 = input + (uint32_t)19U;
uint64_t i3 = load64_le(x02);
uint8_t *x0 = input + (uint32_t)24U;
uint64_t i4 = load64_le(x0);
uint64_t output0 = i0 & (uint64_t)0x7ffffffffffffU;
uint64_t output1 = i1 >> (uint32_t)3U & (uint64_t)0x7ffffffffffffU;
uint64_t output2 = i2 >> (uint32_t)6U & (uint64_t)0x7ffffffffffffU;
uint64_t output3 = i3 >> (uint32_t)1U & (uint64_t)0x7ffffffffffffU;
uint64_t output4 = i4 >> (uint32_t)12U & (uint64_t)0x7ffffffffffffU;
output[0U] = output0;
output[1U] = output1;
output[2U] = output2;
output[3U] = output3;
output[4U] = output4;
}
static void Hacl_EC_Format_fcontract_first_carry_pass(uint64_t *input)
{
uint64_t t0 = input[0U];
uint64_t t1 = input[1U];
uint64_t t2 = input[2U];
uint64_t t3 = input[3U];
uint64_t t4 = input[4U];
uint64_t t1_ = t1 + (t0 >> (uint32_t)51U);
uint64_t t0_ = t0 & (uint64_t)0x7ffffffffffffU;
uint64_t t2_ = t2 + (t1_ >> (uint32_t)51U);
uint64_t t1__ = t1_ & (uint64_t)0x7ffffffffffffU;
uint64_t t3_ = t3 + (t2_ >> (uint32_t)51U);
uint64_t t2__ = t2_ & (uint64_t)0x7ffffffffffffU;
uint64_t t4_ = t4 + (t3_ >> (uint32_t)51U);
uint64_t t3__ = t3_ & (uint64_t)0x7ffffffffffffU;
input[0U] = t0_;
input[1U] = t1__;
input[2U] = t2__;
input[3U] = t3__;
input[4U] = t4_;
}
static void Hacl_EC_Format_fcontract_first_carry_full(uint64_t *input)
{
Hacl_EC_Format_fcontract_first_carry_pass(input);
Hacl_Bignum_Modulo_carry_top(input);
}
static void Hacl_EC_Format_fcontract_second_carry_pass(uint64_t *input)
{
uint64_t t0 = input[0U];
uint64_t t1 = input[1U];
uint64_t t2 = input[2U];
uint64_t t3 = input[3U];
uint64_t t4 = input[4U];
uint64_t t1_ = t1 + (t0 >> (uint32_t)51U);
uint64_t t0_ = t0 & (uint64_t)0x7ffffffffffffU;
uint64_t t2_ = t2 + (t1_ >> (uint32_t)51U);
uint64_t t1__ = t1_ & (uint64_t)0x7ffffffffffffU;
uint64_t t3_ = t3 + (t2_ >> (uint32_t)51U);
uint64_t t2__ = t2_ & (uint64_t)0x7ffffffffffffU;
uint64_t t4_ = t4 + (t3_ >> (uint32_t)51U);
uint64_t t3__ = t3_ & (uint64_t)0x7ffffffffffffU;
input[0U] = t0_;
input[1U] = t1__;
input[2U] = t2__;
input[3U] = t3__;
input[4U] = t4_;
}
static void Hacl_EC_Format_fcontract_second_carry_full(uint64_t *input)
{
Hacl_EC_Format_fcontract_second_carry_pass(input);
Hacl_Bignum_Modulo_carry_top(input);
uint64_t i0 = input[0U];
uint64_t i1 = input[1U];
uint64_t i0_ = i0 & (uint64_t)0x7ffffffffffffU;
uint64_t i1_ = i1 + (i0 >> (uint32_t)51U);
input[0U] = i0_;
input[1U] = i1_;
}
static void Hacl_EC_Format_fcontract_trim(uint64_t *input)
{
uint64_t a0 = input[0U];
uint64_t a1 = input[1U];
uint64_t a2 = input[2U];
uint64_t a3 = input[3U];
uint64_t a4 = input[4U];
uint64_t mask0 = FStar_UInt64_gte_mask(a0, (uint64_t)0x7ffffffffffedU);
uint64_t mask1 = FStar_UInt64_eq_mask(a1, (uint64_t)0x7ffffffffffffU);
uint64_t mask2 = FStar_UInt64_eq_mask(a2, (uint64_t)0x7ffffffffffffU);
uint64_t mask3 = FStar_UInt64_eq_mask(a3, (uint64_t)0x7ffffffffffffU);
uint64_t mask4 = FStar_UInt64_eq_mask(a4, (uint64_t)0x7ffffffffffffU);
uint64_t mask = (((mask0 & mask1) & mask2) & mask3) & mask4;
uint64_t a0_ = a0 - ((uint64_t)0x7ffffffffffedU & mask);
uint64_t a1_ = a1 - ((uint64_t)0x7ffffffffffffU & mask);
uint64_t a2_ = a2 - ((uint64_t)0x7ffffffffffffU & mask);
uint64_t a3_ = a3 - ((uint64_t)0x7ffffffffffffU & mask);
uint64_t a4_ = a4 - ((uint64_t)0x7ffffffffffffU & mask);
input[0U] = a0_;
input[1U] = a1_;
input[2U] = a2_;
input[3U] = a3_;
input[4U] = a4_;
}
static void Hacl_EC_Format_fcontract_store(uint8_t *output, uint64_t *input)
{
uint64_t t0 = input[0U];
uint64_t t1 = input[1U];
uint64_t t2 = input[2U];
uint64_t t3 = input[3U];
uint64_t t4 = input[4U];
uint64_t o0 = t1 << (uint32_t)51U | t0;
uint64_t o1 = t2 << (uint32_t)38U | t1 >> (uint32_t)13U;
uint64_t o2 = t3 << (uint32_t)25U | t2 >> (uint32_t)26U;
uint64_t o3 = t4 << (uint32_t)12U | t3 >> (uint32_t)39U;
uint8_t *b0 = output;
uint8_t *b1 = output + (uint32_t)8U;
uint8_t *b2 = output + (uint32_t)16U;
uint8_t *b3 = output + (uint32_t)24U;
store64_le(b0, o0);
store64_le(b1, o1);
store64_le(b2, o2);
store64_le(b3, o3);
}
static void Hacl_EC_Format_fcontract(uint8_t *output, uint64_t *input)
{
Hacl_EC_Format_fcontract_first_carry_full(input);
Hacl_EC_Format_fcontract_second_carry_full(input);
Hacl_EC_Format_fcontract_trim(input);
Hacl_EC_Format_fcontract_store(output, input);
}
static void Hacl_EC_Format_scalar_of_point(uint8_t *scalar, uint64_t *point)
{
uint64_t *x = point;
uint64_t *z = point + (uint32_t)5U;
uint64_t buf[10U] = { 0U };
uint64_t *zmone = buf;
uint64_t *sc = buf + (uint32_t)5U;
Hacl_Bignum_crecip(zmone, z);
Hacl_Bignum_fmul(sc, x, zmone);
Hacl_EC_Format_fcontract(scalar, sc);
}
static void
Hacl_EC_AddAndDouble_fmonty(
uint64_t *pp,
uint64_t *ppq,
uint64_t *p,
uint64_t *pq,
uint64_t *qmqp
)
{
uint64_t *qx = qmqp;
uint64_t *x2 = pp;
uint64_t *z2 = pp + (uint32_t)5U;
uint64_t *x3 = ppq;
uint64_t *z3 = ppq + (uint32_t)5U;
uint64_t *x = p;
uint64_t *z = p + (uint32_t)5U;
uint64_t *xprime = pq;
uint64_t *zprime = pq + (uint32_t)5U;
uint64_t buf[40U] = { 0U };
uint64_t *origx = buf;
uint64_t *origxprime = buf + (uint32_t)5U;
uint64_t *xxprime0 = buf + (uint32_t)25U;
uint64_t *zzprime0 = buf + (uint32_t)30U;
memcpy(origx, x, (uint32_t)5U * sizeof x[0U]);
Hacl_Bignum_fsum(x, z);
Hacl_Bignum_fdifference(z, origx);
memcpy(origxprime, xprime, (uint32_t)5U * sizeof xprime[0U]);
Hacl_Bignum_fsum(xprime, zprime);
Hacl_Bignum_fdifference(zprime, origxprime);
Hacl_Bignum_fmul(xxprime0, xprime, z);
Hacl_Bignum_fmul(zzprime0, x, zprime);
uint64_t *origxprime0 = buf + (uint32_t)5U;
uint64_t *xx0 = buf + (uint32_t)15U;
uint64_t *zz0 = buf + (uint32_t)20U;
uint64_t *xxprime = buf + (uint32_t)25U;
uint64_t *zzprime = buf + (uint32_t)30U;
uint64_t *zzzprime = buf + (uint32_t)35U;
memcpy(origxprime0, xxprime, (uint32_t)5U * sizeof xxprime[0U]);
Hacl_Bignum_fsum(xxprime, zzprime);
Hacl_Bignum_fdifference(zzprime, origxprime0);
Hacl_Bignum_Fsquare_fsquare_times(x3, xxprime, (uint32_t)1U);
Hacl_Bignum_Fsquare_fsquare_times(zzzprime, zzprime, (uint32_t)1U);
Hacl_Bignum_fmul(z3, zzzprime, qx);
Hacl_Bignum_Fsquare_fsquare_times(xx0, x, (uint32_t)1U);
Hacl_Bignum_Fsquare_fsquare_times(zz0, z, (uint32_t)1U);
uint64_t *zzz = buf + (uint32_t)10U;
uint64_t *xx = buf + (uint32_t)15U;
uint64_t *zz = buf + (uint32_t)20U;
Hacl_Bignum_fmul(x2, xx, zz);
Hacl_Bignum_fdifference(zz, xx);
uint64_t scalar = (uint64_t)121665U;
Hacl_Bignum_fscalar(zzz, zz, scalar);
Hacl_Bignum_fsum(zzz, xx);
Hacl_Bignum_fmul(z2, zzz, zz);
}
static void
Hacl_EC_Ladder_SmallLoop_cmult_small_loop_step(
uint64_t *nq,
uint64_t *nqpq,
uint64_t *nq2,
uint64_t *nqpq2,
uint64_t *q,
uint8_t byt
)
{
uint64_t bit = (uint64_t)(byt >> (uint32_t)7U);
Hacl_EC_Point_swap_conditional(nq, nqpq, bit);
Hacl_EC_AddAndDouble_fmonty(nq2, nqpq2, nq, nqpq, q);
uint64_t bit0 = (uint64_t)(byt >> (uint32_t)7U);
Hacl_EC_Point_swap_conditional(nq2, nqpq2, bit0);
}
static void
Hacl_EC_Ladder_SmallLoop_cmult_small_loop_double_step(
uint64_t *nq,
uint64_t *nqpq,
uint64_t *nq2,
uint64_t *nqpq2,
uint64_t *q,
uint8_t byt
)
{
Hacl_EC_Ladder_SmallLoop_cmult_small_loop_step(nq, nqpq, nq2, nqpq2, q, byt);
uint8_t byt1 = byt << (uint32_t)1U;
Hacl_EC_Ladder_SmallLoop_cmult_small_loop_step(nq2, nqpq2, nq, nqpq, q, byt1);
}
static void
Hacl_EC_Ladder_SmallLoop_cmult_small_loop(
uint64_t *nq,
uint64_t *nqpq,
uint64_t *nq2,
uint64_t *nqpq2,
uint64_t *q,
uint8_t byt,
uint32_t i
)
{
if (!(i == (uint32_t)0U))
{
uint32_t i_ = i - (uint32_t)1U;
Hacl_EC_Ladder_SmallLoop_cmult_small_loop_double_step(nq, nqpq, nq2, nqpq2, q, byt);
uint8_t byt_ = byt << (uint32_t)2U;
Hacl_EC_Ladder_SmallLoop_cmult_small_loop(nq, nqpq, nq2, nqpq2, q, byt_, i_);
}
}
static void
Hacl_EC_Ladder_BigLoop_cmult_big_loop(
uint8_t *n1,
uint64_t *nq,
uint64_t *nqpq,
uint64_t *nq2,
uint64_t *nqpq2,
uint64_t *q,
uint32_t i
)
{
if (!(i == (uint32_t)0U))
{
uint32_t i1 = i - (uint32_t)1U;
uint8_t byte = n1[i1];
Hacl_EC_Ladder_SmallLoop_cmult_small_loop(nq, nqpq, nq2, nqpq2, q, byte, (uint32_t)4U);
Hacl_EC_Ladder_BigLoop_cmult_big_loop(n1, nq, nqpq, nq2, nqpq2, q, i1);
}
}
static void Hacl_EC_Ladder_cmult(uint64_t *result, uint8_t *n1, uint64_t *q)
{
uint64_t point_buf[40U] = { 0U };
uint64_t *nq = point_buf;
uint64_t *nqpq = point_buf + (uint32_t)10U;
uint64_t *nq2 = point_buf + (uint32_t)20U;
uint64_t *nqpq2 = point_buf + (uint32_t)30U;
Hacl_EC_Point_copy(nqpq, q);
nq[0U] = (uint64_t)1U;
Hacl_EC_Ladder_BigLoop_cmult_big_loop(n1, nq, nqpq, nq2, nqpq2, q, (uint32_t)32U);
Hacl_EC_Point_copy(result, nq);
}
void Hacl_Curve25519_crypto_scalarmult(uint8_t *mypublic, uint8_t *secret, uint8_t *basepoint)
{
uint64_t buf0[10U] = { 0U };
uint64_t *x0 = buf0;
uint64_t *z = buf0 + (uint32_t)5U;
Hacl_EC_Format_fexpand(x0, basepoint);
z[0U] = (uint64_t)1U;
uint64_t *q = buf0;
uint8_t e[32U] = { 0U };
memcpy(e, secret, (uint32_t)32U * sizeof secret[0U]);
uint8_t e0 = e[0U];
uint8_t e31 = e[31U];
uint8_t e01 = e0 & (uint8_t)248U;
uint8_t e311 = e31 & (uint8_t)127U;
uint8_t e312 = e311 | (uint8_t)64U;
e[0U] = e01;
e[31U] = e312;
uint8_t *scalar = e;
uint64_t buf[15U] = { 0U };
uint64_t *nq = buf;
uint64_t *x = nq;
x[0U] = (uint64_t)1U;
Hacl_EC_Ladder_cmult(nq, scalar, q);
Hacl_EC_Format_scalar_of_point(mypublic, nq);
}

17
3rdparty/evercrypt/hacl/Hacl_Curve25519.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,17 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: /mnt/e/everest/verify/kremlin/krml -tmpdir x25519-c -I /mnt/e/everest/verify/hacl-star/code/old/lib/kremlin -I /mnt/e/everest/verify/kremlin/kremlib/compat -I /mnt/e/everest/verify/hacl-star/specs -I /mnt/e/everest/verify/hacl-star/specs/old -I . -fparentheses -fcurly-braces -fno-shadow -ccopt -march=native -verbose -ldopt -flto -I ../bignum -bundle Hacl.Curve25519=* -minimal -add-include "kremlib.h" -skip-compilation x25519-c/out.krml -o x25519-c/Hacl_Curve25519.c
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __Hacl_Curve25519_H
#define __Hacl_Curve25519_H
#include "kremlib.h"
void Hacl_Curve25519_crypto_scalarmult(uint8_t *mypublic, uint8_t *secret, uint8_t *basepoint);
#define __Hacl_Curve25519_H_DEFINED
#endif

3245
3rdparty/evercrypt/hacl/Hacl_Ed25519.c поставляемый Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

29
3rdparty/evercrypt/hacl/Hacl_Ed25519.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,29 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: /mnt/e/everest/verify/kremlin/krml -tmpdir ed25519-c -I /mnt/e/everest/verify/hacl-star/code/old/lib/kremlin -I /mnt/e/everest/verify/kremlin/kremlib/compat -I /mnt/e/everest/verify/hacl-star/specs -I /mnt/e/everest/verify/hacl-star/specs/old -I . -fparentheses -fcurly-braces -fno-shadow -ccopt -march=native -verbose -ldopt -flto -I ../bignum -I ../curve25519 -I ../hash -bundle Hacl.Ed25519=* -minimal -add-include "kremlib.h" -skip-compilation ed25519-c/out.krml -o ed25519-c/Hacl_Ed25519.c
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __Hacl_Ed25519_H
#define __Hacl_Ed25519_H
#include "kremlib.h"
typedef uint8_t *Hacl_Ed25519_uint8_p;
typedef uint8_t *Hacl_Ed25519_hint8_p;
void Hacl_Ed25519_sign(uint8_t *signature, uint8_t *secret, uint8_t *msg, uint32_t len1);
bool Hacl_Ed25519_verify(uint8_t *output, uint8_t *msg, uint32_t len1, uint8_t *signature);
void Hacl_Ed25519_secret_to_public(uint8_t *output, uint8_t *secret);
void Hacl_Ed25519_expand_keys(uint8_t *ks, uint8_t *secret);
void Hacl_Ed25519_sign_expanded(uint8_t *signature, uint8_t *ks, uint8_t *msg, uint32_t len1);
#define __Hacl_Ed25519_H_DEFINED
#endif

2080
3rdparty/evercrypt/hacl/Hacl_Hash.c поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

132
3rdparty/evercrypt/hacl/Hacl_Hash.h поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

31
3rdparty/evercrypt/hacl/Hacl_Kremlib.h поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

422
3rdparty/evercrypt/hacl/Hacl_Poly1305_64.c поставляемый Normal file
Просмотреть файл

@ -0,0 +1,422 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: /mnt/e/everest/verify/kremlin/krml -I /mnt/e/everest/verify/hacl-star/code/old/lib/kremlin -I /mnt/e/everest/verify/kremlin/kremlib/compat -I /mnt/e/everest/verify/hacl-star/specs -I /mnt/e/everest/verify/hacl-star/specs/old -I . -fparentheses -fcurly-braces -fno-shadow -ccopt -march=native -verbose -ldopt -flto -I ../bignum -fparentheses -skip-compilation -tmpdir poly-c -add-include "kremlib.h" -minimal -bundle Hacl_Poly1305_64=* poly-c/out.krml -o poly-c/Hacl_Poly1305_64.c
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#include "Hacl_Poly1305_64.h"
extern FStar_UInt128_uint128
FStar_UInt128_add(FStar_UInt128_uint128 x0, FStar_UInt128_uint128 x1);
extern FStar_UInt128_uint128
FStar_UInt128_add_mod(FStar_UInt128_uint128 x0, FStar_UInt128_uint128 x1);
extern FStar_UInt128_uint128
FStar_UInt128_logand(FStar_UInt128_uint128 x0, FStar_UInt128_uint128 x1);
extern FStar_UInt128_uint128
FStar_UInt128_logor(FStar_UInt128_uint128 x0, FStar_UInt128_uint128 x1);
extern FStar_UInt128_uint128 FStar_UInt128_shift_left(FStar_UInt128_uint128 x0, uint32_t x1);
extern FStar_UInt128_uint128 FStar_UInt128_shift_right(FStar_UInt128_uint128 x0, uint32_t x1);
extern FStar_UInt128_uint128 FStar_UInt128_uint64_to_uint128(uint64_t x0);
extern uint64_t FStar_UInt128_uint128_to_uint64(FStar_UInt128_uint128 x0);
extern FStar_UInt128_uint128 FStar_UInt128_mul_wide(uint64_t x0, uint64_t x1);
extern uint64_t FStar_UInt64_eq_mask(uint64_t x0, uint64_t x1);
extern uint64_t FStar_UInt64_gte_mask(uint64_t x0, uint64_t x1);
inline static void
Hacl_Bignum_Fproduct_copy_from_wide_(uint64_t *output, FStar_UInt128_uint128 *input)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)3U; i = i + (uint32_t)1U)
{
FStar_UInt128_uint128 xi = input[i];
output[i] = FStar_UInt128_uint128_to_uint64(xi);
}
}
inline static void
Hacl_Bignum_Fproduct_sum_scalar_multiplication_(
FStar_UInt128_uint128 *output,
uint64_t *input,
uint64_t s
)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)3U; i = i + (uint32_t)1U)
{
FStar_UInt128_uint128 xi = output[i];
uint64_t yi = input[i];
output[i] = FStar_UInt128_add_mod(xi, FStar_UInt128_mul_wide(yi, s));
}
}
inline static void Hacl_Bignum_Fproduct_carry_wide_(FStar_UInt128_uint128 *tmp)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)2U; i = i + (uint32_t)1U)
{
uint32_t ctr = i;
FStar_UInt128_uint128 tctr = tmp[ctr];
FStar_UInt128_uint128 tctrp1 = tmp[ctr + (uint32_t)1U];
uint64_t r0 = FStar_UInt128_uint128_to_uint64(tctr) & (uint64_t)0xfffffffffffU;
FStar_UInt128_uint128 c = FStar_UInt128_shift_right(tctr, (uint32_t)44U);
tmp[ctr] = FStar_UInt128_uint64_to_uint128(r0);
tmp[ctr + (uint32_t)1U] = FStar_UInt128_add(tctrp1, c);
}
}
inline static void Hacl_Bignum_Fproduct_carry_limb_(uint64_t *tmp)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)2U; i = i + (uint32_t)1U)
{
uint32_t ctr = i;
uint64_t tctr = tmp[ctr];
uint64_t tctrp1 = tmp[ctr + (uint32_t)1U];
uint64_t r0 = tctr & (uint64_t)0xfffffffffffU;
uint64_t c = tctr >> (uint32_t)44U;
tmp[ctr] = r0;
tmp[ctr + (uint32_t)1U] = tctrp1 + c;
}
}
inline static void Hacl_Bignum_Modulo_reduce(uint64_t *b)
{
uint64_t b0 = b[0U];
b[0U] = (b0 << (uint32_t)4U) + (b0 << (uint32_t)2U);
}
inline static void Hacl_Bignum_Modulo_carry_top(uint64_t *b)
{
uint64_t b2 = b[2U];
uint64_t b0 = b[0U];
uint64_t b2_42 = b2 >> (uint32_t)42U;
b[2U] = b2 & (uint64_t)0x3ffffffffffU;
b[0U] = (b2_42 << (uint32_t)2U) + b2_42 + b0;
}
inline static void Hacl_Bignum_Modulo_carry_top_wide(FStar_UInt128_uint128 *b)
{
FStar_UInt128_uint128 b2 = b[2U];
FStar_UInt128_uint128 b0 = b[0U];
FStar_UInt128_uint128
b2_ = FStar_UInt128_logand(b2, FStar_UInt128_uint64_to_uint128((uint64_t)0x3ffffffffffU));
uint64_t b2_42 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(b2, (uint32_t)42U));
FStar_UInt128_uint128
b0_ = FStar_UInt128_add(b0, FStar_UInt128_uint64_to_uint128((b2_42 << (uint32_t)2U) + b2_42));
b[2U] = b2_;
b[0U] = b0_;
}
inline static void Hacl_Bignum_Fmul_shift_reduce(uint64_t *output)
{
uint64_t tmp = output[2U];
for (uint32_t i = (uint32_t)0U; i < (uint32_t)2U; i = i + (uint32_t)1U)
{
uint32_t ctr = (uint32_t)3U - i - (uint32_t)1U;
uint64_t z = output[ctr - (uint32_t)1U];
output[ctr] = z;
}
output[0U] = tmp;
Hacl_Bignum_Modulo_reduce(output);
}
static void
Hacl_Bignum_Fmul_mul_shift_reduce_(
FStar_UInt128_uint128 *output,
uint64_t *input,
uint64_t *input2
)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)2U; i = i + (uint32_t)1U)
{
uint64_t input2i = input2[i];
Hacl_Bignum_Fproduct_sum_scalar_multiplication_(output, input, input2i);
Hacl_Bignum_Fmul_shift_reduce(input);
}
uint32_t i = (uint32_t)2U;
uint64_t input2i = input2[i];
Hacl_Bignum_Fproduct_sum_scalar_multiplication_(output, input, input2i);
}
inline static void Hacl_Bignum_Fmul_fmul(uint64_t *output, uint64_t *input, uint64_t *input2)
{
uint64_t tmp[3U] = { 0U };
memcpy(tmp, input, (uint32_t)3U * sizeof input[0U]);
KRML_CHECK_SIZE(sizeof (FStar_UInt128_uint128), (uint32_t)3U);
FStar_UInt128_uint128 t[3U];
for (uint32_t _i = 0U; _i < (uint32_t)3U; ++_i)
t[_i] = FStar_UInt128_uint64_to_uint128((uint64_t)0U);
Hacl_Bignum_Fmul_mul_shift_reduce_(t, tmp, input2);
Hacl_Bignum_Fproduct_carry_wide_(t);
Hacl_Bignum_Modulo_carry_top_wide(t);
Hacl_Bignum_Fproduct_copy_from_wide_(output, t);
uint64_t i0 = output[0U];
uint64_t i1 = output[1U];
uint64_t i0_ = i0 & (uint64_t)0xfffffffffffU;
uint64_t i1_ = i1 + (i0 >> (uint32_t)44U);
output[0U] = i0_;
output[1U] = i1_;
}
inline static void
Hacl_Bignum_AddAndMultiply_add_and_multiply(uint64_t *acc, uint64_t *block, uint64_t *r)
{
for (uint32_t i = (uint32_t)0U; i < (uint32_t)3U; i = i + (uint32_t)1U)
{
uint64_t xi = acc[i];
uint64_t yi = block[i];
acc[i] = xi + yi;
}
Hacl_Bignum_Fmul_fmul(acc, acc, r);
}
typedef struct Hacl_Impl_Poly1305_64_State_poly1305_state_s
{
uint64_t *r;
uint64_t *h;
}
Hacl_Impl_Poly1305_64_State_poly1305_state;
extern FStar_UInt128_uint128 load128_le(uint8_t *x0);
extern void store128_le(uint8_t *x0, FStar_UInt128_uint128 x1);
inline static void
Hacl_Impl_Poly1305_64_poly1305_update(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *m
)
{
uint64_t *acc = st.h;
uint64_t *r = st.r;
uint64_t tmp[3U] = { 0U };
FStar_UInt128_uint128 m0 = load128_le(m);
uint64_t r0 = FStar_UInt128_uint128_to_uint64(m0) & (uint64_t)0xfffffffffffU;
uint64_t
r1 =
FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(m0, (uint32_t)44U))
& (uint64_t)0xfffffffffffU;
uint64_t r2 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(m0, (uint32_t)88U));
tmp[0U] = r0;
tmp[1U] = r1;
tmp[2U] = r2;
uint64_t b2 = tmp[2U];
uint64_t b2_ = (uint64_t)0x10000000000U | b2;
tmp[2U] = b2_;
Hacl_Bignum_AddAndMultiply_add_and_multiply(acc, tmp, r);
}
inline static void
Hacl_Impl_Poly1305_64_poly1305_process_last_block_(
uint8_t *block,
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *m,
uint64_t rem_
)
{
uint64_t tmp[3U] = { 0U };
FStar_UInt128_uint128 m0 = load128_le(block);
uint64_t r0 = FStar_UInt128_uint128_to_uint64(m0) & (uint64_t)0xfffffffffffU;
uint64_t
r1 =
FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(m0, (uint32_t)44U))
& (uint64_t)0xfffffffffffU;
uint64_t r2 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(m0, (uint32_t)88U));
tmp[0U] = r0;
tmp[1U] = r1;
tmp[2U] = r2;
Hacl_Bignum_AddAndMultiply_add_and_multiply(st.h, tmp, st.r);
}
inline static void
Hacl_Impl_Poly1305_64_poly1305_process_last_block(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *m,
uint64_t rem_
)
{
uint8_t zero1 = (uint8_t)0U;
uint8_t block[16U];
for (uint32_t _i = 0U; _i < (uint32_t)16U; ++_i)
block[_i] = zero1;
uint32_t i0 = (uint32_t)rem_;
uint32_t i = (uint32_t)rem_;
memcpy(block, m, i * sizeof m[0U]);
block[i0] = (uint8_t)1U;
Hacl_Impl_Poly1305_64_poly1305_process_last_block_(block, st, m, rem_);
}
static void Hacl_Impl_Poly1305_64_poly1305_last_pass(uint64_t *acc)
{
Hacl_Bignum_Fproduct_carry_limb_(acc);
Hacl_Bignum_Modulo_carry_top(acc);
uint64_t a0 = acc[0U];
uint64_t a10 = acc[1U];
uint64_t a20 = acc[2U];
uint64_t a0_ = a0 & (uint64_t)0xfffffffffffU;
uint64_t r0 = a0 >> (uint32_t)44U;
uint64_t a1_ = (a10 + r0) & (uint64_t)0xfffffffffffU;
uint64_t r1 = (a10 + r0) >> (uint32_t)44U;
uint64_t a2_ = a20 + r1;
acc[0U] = a0_;
acc[1U] = a1_;
acc[2U] = a2_;
Hacl_Bignum_Modulo_carry_top(acc);
uint64_t i0 = acc[0U];
uint64_t i1 = acc[1U];
uint64_t i0_ = i0 & (uint64_t)0xfffffffffffU;
uint64_t i1_ = i1 + (i0 >> (uint32_t)44U);
acc[0U] = i0_;
acc[1U] = i1_;
uint64_t a00 = acc[0U];
uint64_t a1 = acc[1U];
uint64_t a2 = acc[2U];
uint64_t mask0 = FStar_UInt64_gte_mask(a00, (uint64_t)0xffffffffffbU);
uint64_t mask1 = FStar_UInt64_eq_mask(a1, (uint64_t)0xfffffffffffU);
uint64_t mask2 = FStar_UInt64_eq_mask(a2, (uint64_t)0x3ffffffffffU);
uint64_t mask = (mask0 & mask1) & mask2;
uint64_t a0_0 = a00 - ((uint64_t)0xffffffffffbU & mask);
uint64_t a1_0 = a1 - ((uint64_t)0xfffffffffffU & mask);
uint64_t a2_0 = a2 - ((uint64_t)0x3ffffffffffU & mask);
acc[0U] = a0_0;
acc[1U] = a1_0;
acc[2U] = a2_0;
}
static Hacl_Impl_Poly1305_64_State_poly1305_state
Hacl_Impl_Poly1305_64_mk_state(uint64_t *r, uint64_t *h)
{
return ((Hacl_Impl_Poly1305_64_State_poly1305_state){ .r = r, .h = h });
}
static void
Hacl_Standalone_Poly1305_64_poly1305_blocks(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *m,
uint64_t len1
)
{
if (!(len1 == (uint64_t)0U))
{
uint8_t *block = m;
uint8_t *tail1 = m + (uint32_t)16U;
Hacl_Impl_Poly1305_64_poly1305_update(st, block);
uint64_t len2 = len1 - (uint64_t)1U;
Hacl_Standalone_Poly1305_64_poly1305_blocks(st, tail1, len2);
}
}
static void
Hacl_Standalone_Poly1305_64_poly1305_partial(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *input,
uint64_t len1,
uint8_t *kr
)
{
uint64_t *x0 = st.r;
FStar_UInt128_uint128 k1 = load128_le(kr);
FStar_UInt128_uint128
hs =
FStar_UInt128_shift_left(FStar_UInt128_uint64_to_uint128((uint64_t)0x0ffffffc0ffffffcU),
(uint32_t)64U);
FStar_UInt128_uint128 ls = FStar_UInt128_uint64_to_uint128((uint64_t)0x0ffffffc0fffffffU);
FStar_UInt128_uint128 k_clamped = FStar_UInt128_logand(k1, FStar_UInt128_logor(hs, ls));
uint64_t r0 = FStar_UInt128_uint128_to_uint64(k_clamped) & (uint64_t)0xfffffffffffU;
uint64_t
r1 =
FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(k_clamped, (uint32_t)44U))
& (uint64_t)0xfffffffffffU;
uint64_t
r2 = FStar_UInt128_uint128_to_uint64(FStar_UInt128_shift_right(k_clamped, (uint32_t)88U));
x0[0U] = r0;
x0[1U] = r1;
x0[2U] = r2;
uint64_t *x00 = st.h;
x00[0U] = (uint64_t)0U;
x00[1U] = (uint64_t)0U;
x00[2U] = (uint64_t)0U;
Hacl_Standalone_Poly1305_64_poly1305_blocks(st, input, len1);
}
static void
Hacl_Standalone_Poly1305_64_poly1305_complete(
Hacl_Impl_Poly1305_64_State_poly1305_state st,
uint8_t *m,
uint64_t len1,
uint8_t *k1
)
{
uint8_t *kr = k1;
uint64_t len16 = len1 >> (uint32_t)4U;
uint64_t rem16 = len1 & (uint64_t)0xfU;
uint8_t *part_input = m;
uint8_t *last_block = m + (uint32_t)((uint64_t)16U * len16);
Hacl_Standalone_Poly1305_64_poly1305_partial(st, part_input, len16, kr);
if (!(rem16 == (uint64_t)0U))
{
Hacl_Impl_Poly1305_64_poly1305_process_last_block(st, last_block, rem16);
}
uint64_t *acc = st.h;
Hacl_Impl_Poly1305_64_poly1305_last_pass(acc);
}
static void
Hacl_Standalone_Poly1305_64_crypto_onetimeauth_(
uint8_t *output,
uint8_t *input,
uint64_t len1,
uint8_t *k1
)
{
uint64_t buf[6U] = { 0U };
uint64_t *r = buf;
uint64_t *h = buf + (uint32_t)3U;
Hacl_Impl_Poly1305_64_State_poly1305_state st = Hacl_Impl_Poly1305_64_mk_state(r, h);
uint8_t *key_s = k1 + (uint32_t)16U;
Hacl_Standalone_Poly1305_64_poly1305_complete(st, input, len1, k1);
uint64_t *acc = st.h;
FStar_UInt128_uint128 k_ = load128_le(key_s);
uint64_t h0 = acc[0U];
uint64_t h1 = acc[1U];
uint64_t h2 = acc[2U];
uint64_t accl = h1 << (uint32_t)44U | h0;
uint64_t acch = h2 << (uint32_t)24U | h1 >> (uint32_t)20U;
FStar_UInt128_uint128
acc_ =
FStar_UInt128_logor(FStar_UInt128_shift_left(FStar_UInt128_uint64_to_uint128(acch),
(uint32_t)64U),
FStar_UInt128_uint64_to_uint128(accl));
FStar_UInt128_uint128 acc_0 = acc_;
FStar_UInt128_uint128 mac_ = FStar_UInt128_add_mod(acc_0, k_);
store128_le(output, mac_);
}
static void
Hacl_Standalone_Poly1305_64_crypto_onetimeauth(
uint8_t *output,
uint8_t *input,
uint64_t len1,
uint8_t *k1
)
{
Hacl_Standalone_Poly1305_64_crypto_onetimeauth_(output, input, len1, k1);
}
void
Hacl_Poly1305_64_crypto_onetimeauth(
uint8_t *output,
uint8_t *input,
uint64_t len1,
uint8_t *k1
)
{
Hacl_Standalone_Poly1305_64_crypto_onetimeauth(output, input, len1, k1);
}

27
3rdparty/evercrypt/hacl/Hacl_Poly1305_64.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,27 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: /mnt/e/everest/verify/kremlin/krml -I /mnt/e/everest/verify/hacl-star/code/old/lib/kremlin -I /mnt/e/everest/verify/kremlin/kremlib/compat -I /mnt/e/everest/verify/hacl-star/specs -I /mnt/e/everest/verify/hacl-star/specs/old -I . -fparentheses -fcurly-braces -fno-shadow -ccopt -march=native -verbose -ldopt -flto -I ../bignum -fparentheses -skip-compilation -tmpdir poly-c -add-include "kremlib.h" -minimal -bundle Hacl_Poly1305_64=* poly-c/out.krml -o poly-c/Hacl_Poly1305_64.c
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __Hacl_Poly1305_64_H
#define __Hacl_Poly1305_64_H
#include "kremlib.h"
typedef uint8_t *Hacl_Poly1305_64_uint8_p;
typedef uint64_t Hacl_Poly1305_64_uint64_t;
void
Hacl_Poly1305_64_crypto_onetimeauth(
uint8_t *output,
uint8_t *input,
uint64_t len1,
uint8_t *k1
);
#define __Hacl_Poly1305_64_H_DEFINED
#endif

289
3rdparty/evercrypt/hacl/Hacl_SHA3.c поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

84
3rdparty/evercrypt/hacl/Hacl_SHA3.h поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

55
3rdparty/evercrypt/hacl/Lib_PrintBuffer.c поставляемый Normal file
Просмотреть файл

@ -0,0 +1,55 @@
#include "stdint.h"
#include "stdio.h"
#include "stdbool.h"
#include "Lib_PrintBuffer.h"
void Lib_PrintBuffer_print_bytes(uint32_t len, uint8_t* buffer) {
for (uint32_t i = 0; i < len; i++){
printf("%02x ", buffer[i]);
}
printf("\n");
}
void Lib_PrintBuffer_print_compare(uint32_t len, uint8_t* buffer1, uint8_t* buffer2) {
uint32_t i;
for (i = 0; i < len; i++){
printf("%02x ", buffer1[i]);
}
printf("\n");
for (i = 0; i < len; i++){
printf("%02x ", buffer2[i]);
}
printf("\n");
}
void Lib_PrintBuffer_print_compare_display(uint32_t len, uint8_t* buffer1, uint8_t* buffer2) {
uint8_t res = 0;
uint32_t i;
Lib_PrintBuffer_print_compare(len, buffer1, buffer2);
for (i = 0; i < len; i++) {
res |= buffer1[i] ^ buffer2[i];
}
if (res == 0) {
printf("Success !\n");
} else {
printf("Failure !\n");
}
printf("\n");
}
bool Lib_PrintBuffer_result_compare_display(uint32_t len, uint8_t* buffer1, uint8_t* buffer2) {
uint8_t res = 0;
uint32_t i;
Lib_PrintBuffer_print_compare(len, buffer1, buffer2);
for (i = 0; i < len; i++) {
res |= buffer1[i] ^ buffer2[i];
}
if (res == 0) {
printf("Success !\n\n");
return true;
} else {
printf("Failure !\n\n");
return false;
}
}

23
3rdparty/evercrypt/hacl/Lib_PrintBuffer.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,23 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: /mnt/e/everest/verify/kremlin/krml -tmpdir dist/headers/ -skip-compilation -bundle Lib.PrintBuffer= -bundle Lib.RandomBuffer= -library Lib.PrintBuffer -library Lib.RandomBuffer -minimal -add-include "kremlib.h" -bundle \*,WindowsBug .extracted/prims.krml .extracted/FStar_Pervasives_Native.krml .extracted/FStar_Pervasives.krml .extracted/FStar_Mul.krml .extracted/FStar_Squash.krml .extracted/FStar_Classical.krml .extracted/FStar_StrongExcludedMiddle.krml .extracted/FStar_FunctionalExtensionality.krml .extracted/FStar_List_Tot_Base.krml .extracted/FStar_List_Tot_Properties.krml .extracted/FStar_List_Tot.krml .extracted/FStar_Seq_Base.krml .extracted/FStar_Seq_Properties.krml .extracted/FStar_Seq.krml .extracted/FStar_Math_Lib.krml .extracted/FStar_Math_Lemmas.krml .extracted/FStar_BitVector.krml .extracted/FStar_UInt.krml .extracted/FStar_UInt32.krml .extracted/FStar_Int.krml .extracted/FStar_Int16.krml .extracted/FStar_Preorder.krml .extracted/FStar_Ghost.krml .extracted/FStar_ErasedLogic.krml .extracted/FStar_Set.krml .extracted/FStar_PropositionalExtensionality.krml .extracted/FStar_PredicateExtensionality.krml .extracted/FStar_TSet.krml .extracted/FStar_Monotonic_Heap.krml .extracted/FStar_Heap.krml .extracted/FStar_Map.krml .extracted/FStar_Monotonic_HyperHeap.krml .extracted/FStar_Monotonic_HyperStack.krml .extracted/FStar_HyperStack.krml .extracted/FStar_Monotonic_Witnessed.krml .extracted/FStar_HyperStack_ST.krml .extracted/FStar_HyperStack_All.krml .extracted/FStar_UInt64.krml .extracted/FStar_Exn.krml .extracted/FStar_ST.krml .extracted/FStar_All.krml .extracted/Lib_LoopCombinators.krml .extracted/FStar_Int64.krml .extracted/FStar_Int63.krml .extracted/FStar_Int32.krml .extracted/FStar_Int8.krml .extracted/FStar_UInt63.krml .extracted/FStar_UInt16.krml .extracted/FStar_UInt8.krml .extracted/FStar_Int_Cast.krml .extracted/FStar_UInt128.krml .extracted/FStar_Int_Cast_Full.krml .extracted/Lib_IntTypes.krml .extracted/Lib_Sequence.krml .extracted/Spec_SHA3_Constants.krml .extracted/Lib_RawIntTypes.krml .extracted/FStar_Kremlin_Endianness.krml .extracted/Spec_Hash_Definitions.krml .extracted/Spec_Hash_Lemmas0.krml .extracted/Spec_Hash_PadFinish.krml .extracted/Spec_Loops.krml .extracted/Spec_SHA1.krml .extracted/Spec_MD5.krml .extracted/FStar_List.krml .extracted/Spec_SHA2_Constants.krml .extracted/Spec_SHA2.krml .extracted/Spec_Hash.krml .extracted/FStar_Order.krml .extracted/Spec_Hash_Incremental.krml .extracted/Spec_Hash_Lemmas.krml .extracted/FStar_Universe.krml .extracted/FStar_GSet.krml .extracted/FStar_ModifiesGen.krml .extracted/FStar_Range.krml .extracted/FStar_Reflection_Types.krml .extracted/FStar_Tactics_Types.krml .extracted/FStar_Tactics_Result.krml .extracted/FStar_Tactics_Effect.krml .extracted/FStar_Tactics_Util.krml .extracted/FStar_Reflection_Data.krml .extracted/FStar_Reflection_Const.krml .extracted/FStar_Char.krml .extracted/FStar_String.krml .extracted/FStar_Reflection_Basic.krml .extracted/FStar_Reflection_Derived.krml .extracted/FStar_Tactics_Builtins.krml .extracted/FStar_Reflection_Formula.krml .extracted/FStar_Reflection_Derived_Lemmas.krml .extracted/FStar_Reflection.krml .extracted/FStar_Tactics_Derived.krml .extracted/FStar_Tactics_Logic.krml .extracted/FStar_Tactics.krml .extracted/FStar_BigOps.krml .extracted/LowStar_Monotonic_Buffer.krml .extracted/LowStar_Buffer.krml .extracted/LowStar_BufferOps.krml .extracted/C_Loops.krml .extracted/C_Endianness.krml .extracted/Hacl_Hash_Lemmas.krml .extracted/LowStar_Modifies.krml .extracted/Hacl_Hash_Definitions.krml .extracted/Hacl_Hash_PadFinish.krml .extracted/Hacl_Hash_MD.krml .extracted/LowStar_Modifies_Linear.krml .extracted/LowStar_ImmutableBuffer.krml .extracted/Hacl_Hash_Core_SHA1.krml .extracted/Hacl_Hash_SHA1.krml .extracted/Hacl_Hash_Core_MD5.krml .extracted/Hacl_Hash_MD5.krml .extracted/Lib_Loops.krml .extracted/Lib_ByteSequence.krml .extracted/Lib_Buffer.krml .extracted/C.krml .extracted/Lib_ByteBuffer.krml .extracted/C_String.krml .extracted/Spec_SHA3.krml .extracted/Hacl_Impl_SHA3.krml .extracted/Hacl_SHA3.krml .extracted/Lib_PrintBuffer.krml .extracted/Hacl_Test_CSHAKE.krml .extracted/Spec_Hash_Test.krml .extracted/FStar_Float.krml .extracted/FStar_IO.krml .extracted/Spec_SHA3_Test.krml .extracted/Hacl_Hash_Core_SHA2_Constants.krml .extracted/Hacl_Hash_Core_SHA2.krml .extracted/Hacl_Hash_SHA2.krml .extracted/Lib_RandomBuffer.krml .extracted/Hacl_Hash_Agile.krml .extracted/Hacl_Test_SHA3.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __Lib_PrintBuffer_H
#define __Lib_PrintBuffer_H
#include "kremlib.h"
extern void Lib_PrintBuffer_print_bytes(uint32_t x0, uint8_t *x1);
extern void Lib_PrintBuffer_print_compare(uint32_t x0, uint8_t *x1, uint8_t *x2);
extern void Lib_PrintBuffer_print_compare_display(uint32_t x0, uint8_t *x1, uint8_t *x2);
extern bool Lib_PrintBuffer_result_compare_display(uint32_t x0, uint8_t *x1, uint8_t *x2);
#define __Lib_PrintBuffer_H_DEFINED
#endif

83
3rdparty/evercrypt/hacl/Lib_RandomBuffer.c поставляемый Normal file
Просмотреть файл

@ -0,0 +1,83 @@
#include "Lib_RandomBuffer.h"
#include <stdio.h>
#if (defined(_WIN32) || defined(_WIN64))
#include <inttypes.h>
#include <stdbool.h>
#include <malloc.h>
#include <windows.h>
bool read_random_bytes(uint32_t len, uint8_t *buf) {
HCRYPTPROV ctxt;
if (!(CryptAcquireContext(&ctxt, NULL, NULL, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT))) {
DWORD error = GetLastError();
printf("Cannot acquire crypto context: 0x%lx\n", error);
return false;
}
bool pass = true;
if (!(CryptGenRandom(ctxt, (uint64_t)len, buf))) {
printf("Cannot read random bytes\n");
pass = false;
}
CryptReleaseContext(ctxt, 0);
return pass;
}
void *hacl_aligned_malloc(size_t alignment, size_t size) {
void *res = _aligned_malloc(size, alignment);
if (res == NULL) {
printf("Cannot allocate %" PRIu64 " bytes aligned to %" PRIu64 "\n",
(uint64_t)size, (uint64_t)alignment);
}
return res;
}
void hacl_aligned_free(void *ptr) { _aligned_free(ptr); }
#else
/* assume POSIX here */
#include <fcntl.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
bool read_random_bytes(uint32_t len, uint8_t *buf) {
int fd = open("/dev/urandom", O_RDONLY);
if (fd == -1) {
printf("Cannot open /dev/urandom\n");
return false;
}
bool pass = true;
uint64_t res = read(fd, buf, (uint64_t)len);
if (res != (uint64_t)len) {
printf("Error on reading, expected %" PRIu32 " bytes, got %" PRIu64
" bytes\n",
len, res);
pass = false;
}
close(fd);
return pass;
}
void *hacl_aligned_malloc(size_t alignment, size_t size) {
void *res = NULL;
if (posix_memalign(&res, alignment, size)) {
printf("Cannot allocate %" PRIu64 " bytes aligned to %" PRIu64 "\n",
(uint64_t)size, (uint64_t)alignment);
return NULL;
}
return res;
}
void hacl_aligned_free(void *ptr) { free(ptr); }
#endif
void randombytes(uint8_t *x, uint32_t len) {
if (!(read_random_bytes(len, x)))
exit(1);
}

17
3rdparty/evercrypt/hacl/Lib_RandomBuffer.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,17 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: /mnt/e/everest/verify/kremlin/krml -tmpdir dist/headers/ -skip-compilation -bundle Lib.PrintBuffer= -bundle Lib.RandomBuffer= -library Lib.PrintBuffer -library Lib.RandomBuffer -minimal -add-include "kremlib.h" -bundle \*,WindowsBug .extracted/prims.krml .extracted/FStar_Pervasives_Native.krml .extracted/FStar_Pervasives.krml .extracted/FStar_Mul.krml .extracted/FStar_Squash.krml .extracted/FStar_Classical.krml .extracted/FStar_StrongExcludedMiddle.krml .extracted/FStar_FunctionalExtensionality.krml .extracted/FStar_List_Tot_Base.krml .extracted/FStar_List_Tot_Properties.krml .extracted/FStar_List_Tot.krml .extracted/FStar_Seq_Base.krml .extracted/FStar_Seq_Properties.krml .extracted/FStar_Seq.krml .extracted/FStar_Math_Lib.krml .extracted/FStar_Math_Lemmas.krml .extracted/FStar_BitVector.krml .extracted/FStar_UInt.krml .extracted/FStar_UInt32.krml .extracted/FStar_Int.krml .extracted/FStar_Int16.krml .extracted/FStar_Preorder.krml .extracted/FStar_Ghost.krml .extracted/FStar_ErasedLogic.krml .extracted/FStar_Set.krml .extracted/FStar_PropositionalExtensionality.krml .extracted/FStar_PredicateExtensionality.krml .extracted/FStar_TSet.krml .extracted/FStar_Monotonic_Heap.krml .extracted/FStar_Heap.krml .extracted/FStar_Map.krml .extracted/FStar_Monotonic_HyperHeap.krml .extracted/FStar_Monotonic_HyperStack.krml .extracted/FStar_HyperStack.krml .extracted/FStar_Monotonic_Witnessed.krml .extracted/FStar_HyperStack_ST.krml .extracted/FStar_HyperStack_All.krml .extracted/FStar_UInt64.krml .extracted/FStar_Exn.krml .extracted/FStar_ST.krml .extracted/FStar_All.krml .extracted/Lib_LoopCombinators.krml .extracted/FStar_Int64.krml .extracted/FStar_Int63.krml .extracted/FStar_Int32.krml .extracted/FStar_Int8.krml .extracted/FStar_UInt63.krml .extracted/FStar_UInt16.krml .extracted/FStar_UInt8.krml .extracted/FStar_Int_Cast.krml .extracted/FStar_UInt128.krml .extracted/FStar_Int_Cast_Full.krml .extracted/Lib_IntTypes.krml .extracted/Lib_Sequence.krml .extracted/Spec_SHA3_Constants.krml .extracted/Lib_RawIntTypes.krml .extracted/FStar_Kremlin_Endianness.krml .extracted/Spec_Hash_Definitions.krml .extracted/Spec_Hash_Lemmas0.krml .extracted/Spec_Hash_PadFinish.krml .extracted/Spec_Loops.krml .extracted/Spec_SHA1.krml .extracted/Spec_MD5.krml .extracted/FStar_List.krml .extracted/Spec_SHA2_Constants.krml .extracted/Spec_SHA2.krml .extracted/Spec_Hash.krml .extracted/FStar_Order.krml .extracted/Spec_Hash_Incremental.krml .extracted/Spec_Hash_Lemmas.krml .extracted/FStar_Universe.krml .extracted/FStar_GSet.krml .extracted/FStar_ModifiesGen.krml .extracted/FStar_Range.krml .extracted/FStar_Reflection_Types.krml .extracted/FStar_Tactics_Types.krml .extracted/FStar_Tactics_Result.krml .extracted/FStar_Tactics_Effect.krml .extracted/FStar_Tactics_Util.krml .extracted/FStar_Reflection_Data.krml .extracted/FStar_Reflection_Const.krml .extracted/FStar_Char.krml .extracted/FStar_String.krml .extracted/FStar_Reflection_Basic.krml .extracted/FStar_Reflection_Derived.krml .extracted/FStar_Tactics_Builtins.krml .extracted/FStar_Reflection_Formula.krml .extracted/FStar_Reflection_Derived_Lemmas.krml .extracted/FStar_Reflection.krml .extracted/FStar_Tactics_Derived.krml .extracted/FStar_Tactics_Logic.krml .extracted/FStar_Tactics.krml .extracted/FStar_BigOps.krml .extracted/LowStar_Monotonic_Buffer.krml .extracted/LowStar_Buffer.krml .extracted/LowStar_BufferOps.krml .extracted/C_Loops.krml .extracted/C_Endianness.krml .extracted/Hacl_Hash_Lemmas.krml .extracted/LowStar_Modifies.krml .extracted/Hacl_Hash_Definitions.krml .extracted/Hacl_Hash_PadFinish.krml .extracted/Hacl_Hash_MD.krml .extracted/LowStar_Modifies_Linear.krml .extracted/LowStar_ImmutableBuffer.krml .extracted/Hacl_Hash_Core_SHA1.krml .extracted/Hacl_Hash_SHA1.krml .extracted/Hacl_Hash_Core_MD5.krml .extracted/Hacl_Hash_MD5.krml .extracted/Lib_Loops.krml .extracted/Lib_ByteSequence.krml .extracted/Lib_Buffer.krml .extracted/C.krml .extracted/Lib_ByteBuffer.krml .extracted/C_String.krml .extracted/Spec_SHA3.krml .extracted/Hacl_Impl_SHA3.krml .extracted/Hacl_SHA3.krml .extracted/Lib_PrintBuffer.krml .extracted/Hacl_Test_CSHAKE.krml .extracted/Spec_Hash_Test.krml .extracted/FStar_Float.krml .extracted/FStar_IO.krml .extracted/Spec_SHA3_Test.krml .extracted/Hacl_Hash_Core_SHA2_Constants.krml .extracted/Hacl_Hash_Core_SHA2.krml .extracted/Hacl_Hash_SHA2.krml .extracted/Lib_RandomBuffer.krml .extracted/Hacl_Hash_Agile.krml .extracted/Hacl_Test_SHA3.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __Lib_RandomBuffer_H
#define __Lib_RandomBuffer_H
#include "kremlib.h"
extern bool Lib_RandomBuffer_randombytes(uint8_t *x0, uint32_t x1);
#define __Lib_RandomBuffer_H_DEFINED
#endif

8
3rdparty/evercrypt/kludges/kremlib_missing.c поставляемый Normal file
Просмотреть файл

@ -0,0 +1,8 @@
#ifdef INSIDE_ENCLAVE
void exit(int status)
{
/* Nothing */
}
#endif // INSIDE_ENCLAVE

27
3rdparty/evercrypt/kremlin/include/kremlib.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,27 @@
#ifndef __KREMLIB_H
#define __KREMLIB_H
/******************************************************************************/
/* The all-in-one kremlib.h header */
/******************************************************************************/
/* This is a meta-header that is included by default in KreMLin generated
* programs. If you wish to have a more lightweight set of headers, or are
* targeting an environment where controlling these macros yourself is
* important, consider using:
*
* krml -minimal
*
* to disable the inclusion of this file (note: this also disables the default
* argument "-bundle FStar.*"). You can then include the headers of your choice
* one by one, using -add-early-include. */
#include "kremlin/internal/target.h"
#include "kremlin/internal/callconv.h"
#include "kremlin/internal/builtin.h"
#include "kremlin/internal/debug.h"
#include "kremlin/internal/types.h"
#include "kremlin/c_endianness.h"
#endif /* __KREMLIB_H */

204
3rdparty/evercrypt/kremlin/include/kremlin/c_endianness.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,204 @@
/* Copyright (c) INRIA and Microsoft Corporation. All rights reserved.
Licensed under the Apache 2.0 License. */
#ifndef __KREMLIN_ENDIAN_H
#define __KREMLIN_ENDIAN_H
#include <string.h>
#include <inttypes.h>
/******************************************************************************/
/* Implementing C.fst (part 2: endian-ness macros) */
/******************************************************************************/
/* ... for Linux */
#if defined(__linux__) || defined(__CYGWIN__) || defined (__USE_SYSTEM_ENDIAN_H__)
# include <endian.h>
/* ... for OSX */
#elif defined(__APPLE__)
# include <libkern/OSByteOrder.h>
# define htole64(x) OSSwapHostToLittleInt64(x)
# define le64toh(x) OSSwapLittleToHostInt64(x)
# define htobe64(x) OSSwapHostToBigInt64(x)
# define be64toh(x) OSSwapBigToHostInt64(x)
# define htole16(x) OSSwapHostToLittleInt16(x)
# define le16toh(x) OSSwapLittleToHostInt16(x)
# define htobe16(x) OSSwapHostToBigInt16(x)
# define be16toh(x) OSSwapBigToHostInt16(x)
# define htole32(x) OSSwapHostToLittleInt32(x)
# define le32toh(x) OSSwapLittleToHostInt32(x)
# define htobe32(x) OSSwapHostToBigInt32(x)
# define be32toh(x) OSSwapBigToHostInt32(x)
/* ... for Solaris */
#elif defined(__sun__)
# include <sys/byteorder.h>
# define htole64(x) LE_64(x)
# define le64toh(x) LE_64(x)
# define htobe64(x) BE_64(x)
# define be64toh(x) BE_64(x)
# define htole16(x) LE_16(x)
# define le16toh(x) LE_16(x)
# define htobe16(x) BE_16(x)
# define be16toh(x) BE_16(x)
# define htole32(x) LE_32(x)
# define le32toh(x) LE_32(x)
# define htobe32(x) BE_32(x)
# define be32toh(x) BE_32(x)
/* ... for the BSDs */
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
# include <sys/endian.h>
#elif defined(__OpenBSD__)
# include <endian.h>
/* ... for Windows (MSVC)... not targeting XBOX 360! */
#elif defined(_MSC_VER)
# include <stdlib.h>
# define htobe16(x) _byteswap_ushort(x)
# define htole16(x) (x)
# define be16toh(x) _byteswap_ushort(x)
# define le16toh(x) (x)
# define htobe32(x) _byteswap_ulong(x)
# define htole32(x) (x)
# define be32toh(x) _byteswap_ulong(x)
# define le32toh(x) (x)
# define htobe64(x) _byteswap_uint64(x)
# define htole64(x) (x)
# define be64toh(x) _byteswap_uint64(x)
# define le64toh(x) (x)
/* ... for Windows (GCC-like, e.g. mingw or clang) */
#elif (defined(_WIN32) || defined(_WIN64)) && \
(defined(__GNUC__) || defined(__clang__))
# define htobe16(x) __builtin_bswap16(x)
# define htole16(x) (x)
# define be16toh(x) __builtin_bswap16(x)
# define le16toh(x) (x)
# define htobe32(x) __builtin_bswap32(x)
# define htole32(x) (x)
# define be32toh(x) __builtin_bswap32(x)
# define le32toh(x) (x)
# define htobe64(x) __builtin_bswap64(x)
# define htole64(x) (x)
# define be64toh(x) __builtin_bswap64(x)
# define le64toh(x) (x)
/* ... generic big-endian fallback code */
#elif defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
/* byte swapping code inspired by:
* https://github.com/rweather/arduinolibs/blob/master/libraries/Crypto/utility/EndianUtil.h
* */
# define htobe32(x) (x)
# define be32toh(x) (x)
# define htole32(x) \
(__extension__({ \
uint32_t _temp = (x); \
((_temp >> 24) & 0x000000FF) | ((_temp >> 8) & 0x0000FF00) | \
((_temp << 8) & 0x00FF0000) | ((_temp << 24) & 0xFF000000); \
}))
# define le32toh(x) (htole32((x)))
# define htobe64(x) (x)
# define be64toh(x) (x)
# define htole64(x) \
(__extension__({ \
uint64_t __temp = (x); \
uint32_t __low = htobe32((uint32_t)__temp); \
uint32_t __high = htobe32((uint32_t)(__temp >> 32)); \
(((uint64_t)__low) << 32) | __high; \
}))
# define le64toh(x) (htole64((x)))
/* ... generic little-endian fallback code */
#elif defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
# define htole32(x) (x)
# define le32toh(x) (x)
# define htobe32(x) \
(__extension__({ \
uint32_t _temp = (x); \
((_temp >> 24) & 0x000000FF) | ((_temp >> 8) & 0x0000FF00) | \
((_temp << 8) & 0x00FF0000) | ((_temp << 24) & 0xFF000000); \
}))
# define be32toh(x) (htobe32((x)))
# define htole64(x) (x)
# define le64toh(x) (x)
# define htobe64(x) \
(__extension__({ \
uint64_t __temp = (x); \
uint32_t __low = htobe32((uint32_t)__temp); \
uint32_t __high = htobe32((uint32_t)(__temp >> 32)); \
(((uint64_t)__low) << 32) | __high; \
}))
# define be64toh(x) (htobe64((x)))
/* ... couldn't determine endian-ness of the target platform */
#else
# error "Please define __BYTE_ORDER__!"
#endif /* defined(__linux__) || ... */
/* Loads and stores. These avoid undefined behavior due to unaligned memory
* accesses, via memcpy. */
inline static uint16_t load16(uint8_t *b) {
uint16_t x;
memcpy(&x, b, 2);
return x;
}
inline static uint32_t load32(uint8_t *b) {
uint32_t x;
memcpy(&x, b, 4);
return x;
}
inline static uint64_t load64(uint8_t *b) {
uint64_t x;
memcpy(&x, b, 8);
return x;
}
inline static void store16(uint8_t *b, uint16_t i) {
memcpy(b, &i, 2);
}
inline static void store32(uint8_t *b, uint32_t i) {
memcpy(b, &i, 4);
}
inline static void store64(uint8_t *b, uint64_t i) {
memcpy(b, &i, 8);
}
#define load16_le(b) (le16toh(load16(b)))
#define store16_le(b, i) (store16(b, htole16(i)))
#define load16_be(b) (be16toh(load16(b)))
#define store16_be(b, i) (store16(b, htobe16(i)))
#define load32_le(b) (le32toh(load32(b)))
#define store32_le(b, i) (store32(b, htole32(i)))
#define load32_be(b) (be32toh(load32(b)))
#define store32_be(b, i) (store32(b, htobe32(i)))
#define load64_le(b) (le64toh(load64(b)))
#define store64_le(b, i) (store64(b, htole64(i)))
#define load64_be(b) (be64toh(load64(b)))
#define store64_be(b, i) (store64(b, htobe64(i)))
#endif

16
3rdparty/evercrypt/kremlin/include/kremlin/internal/builtin.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,16 @@
/* Copyright (c) INRIA and Microsoft Corporation. All rights reserved.
Licensed under the Apache 2.0 License. */
#ifndef __KREMLIN_BUILTIN_H
#define __KREMLIN_BUILTIN_H
/* For alloca, when using KreMLin's -falloca */
#if (defined(_WIN32) || defined(_WIN64))
# include <malloc.h>
#endif
/* If some globals need to be initialized before the main, then kremlin will
* generate and try to link last a function with this type: */
void kremlinit_globals(void);
#endif

46
3rdparty/evercrypt/kremlin/include/kremlin/internal/callconv.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,46 @@
/* Copyright (c) INRIA and Microsoft Corporation. All rights reserved.
Licensed under the Apache 2.0 License. */
#ifndef __KREMLIN_CALLCONV_H
#define __KREMLIN_CALLCONV_H
/******************************************************************************/
/* Some macros to ease compatibility */
/******************************************************************************/
/* We want to generate __cdecl safely without worrying about it being undefined.
* When using MSVC, these are always defined. When using MinGW, these are
* defined too. They have no meaning for other platforms, so we define them to
* be empty macros in other situations. */
#ifndef _MSC_VER
#ifndef __cdecl
#define __cdecl
#endif
#ifndef __stdcall
#define __stdcall
#endif
#ifndef __fastcall
#define __fastcall
#endif
#endif
/* Since KreMLin emits the inline keyword unconditionally, we follow the
* guidelines at https://gcc.gnu.org/onlinedocs/gcc/Inline.html and make this
* __inline__ to ensure the code compiles with -std=c90 and earlier. */
#ifdef __GNUC__
# define inline __inline__
#endif
/* GCC-specific attribute syntax; everyone else gets the standard C inline
* attribute. */
#ifdef __GNU_C__
# ifndef __clang__
# define force_inline inline __attribute__((always_inline))
# else
# define force_inline inline
# endif
#else
# define force_inline inline
#endif
#endif

34
3rdparty/evercrypt/kremlin/include/kremlin/internal/compat.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,34 @@
/* Copyright (c) INRIA and Microsoft Corporation. All rights reserved.
Licensed under the Apache 2.0 License. */
#ifndef KRML_COMPAT_H
#define KRML_COMPAT_H
#include <inttypes.h>
/* A series of macros that define C implementations of types that are not Low*,
* to facilitate porting programs to Low*. */
typedef const char *Prims_string;
typedef struct {
uint32_t length;
const char *data;
} FStar_Bytes_bytes;
typedef int32_t Prims_pos, Prims_nat, Prims_nonzero, Prims_int,
krml_checked_int_t;
#define RETURN_OR(x) \
do { \
int64_t __ret = x; \
if (__ret < INT32_MIN || INT32_MAX < __ret) { \
KRML_HOST_PRINTF( \
"Prims.{int,nat,pos} integer overflow at %s:%d\n", __FILE__, \
__LINE__); \
KRML_HOST_EXIT(252); \
} \
return (int32_t)__ret; \
} while (0)
#endif

57
3rdparty/evercrypt/kremlin/include/kremlin/internal/debug.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,57 @@
/* Copyright (c) INRIA and Microsoft Corporation. All rights reserved.
Licensed under the Apache 2.0 License. */
#ifndef __KREMLIN_DEBUG_H
#define __KREMLIN_DEBUG_H
#include <inttypes.h>
#include "kremlin/internal/target.h"
/******************************************************************************/
/* Debugging helpers - intended only for KreMLin developers */
/******************************************************************************/
/* In support of "-wasm -d force-c": we might need this function to be
* forward-declared, because the dependency on WasmSupport appears very late,
* after SimplifyWasm, and sadly, after the topological order has been done. */
void WasmSupport_check_buffer_size(uint32_t s);
/* A series of GCC atrocities to trace function calls (kremlin's [-d c-calls]
* option). Useful when trying to debug, say, Wasm, to compare traces. */
/* clang-format off */
#ifdef __GNUC__
#define KRML_FORMAT(X) _Generic((X), \
uint8_t : "0x%08" PRIx8, \
uint16_t: "0x%08" PRIx16, \
uint32_t: "0x%08" PRIx32, \
uint64_t: "0x%08" PRIx64, \
int8_t : "0x%08" PRIx8, \
int16_t : "0x%08" PRIx16, \
int32_t : "0x%08" PRIx32, \
int64_t : "0x%08" PRIx64, \
default : "%s")
#define KRML_FORMAT_ARG(X) _Generic((X), \
uint8_t : X, \
uint16_t: X, \
uint32_t: X, \
uint64_t: X, \
int8_t : X, \
int16_t : X, \
int32_t : X, \
int64_t : X, \
default : "unknown")
/* clang-format on */
# define KRML_DEBUG_RETURN(X) \
({ \
__auto_type _ret = (X); \
KRML_HOST_PRINTF("returning: "); \
KRML_HOST_PRINTF(KRML_FORMAT(_ret), KRML_FORMAT_ARG(_ret)); \
KRML_HOST_PRINTF(" \n"); \
_ret; \
})
#endif
#endif

102
3rdparty/evercrypt/kremlin/include/kremlin/internal/target.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,102 @@
/* Copyright (c) INRIA and Microsoft Corporation. All rights reserved.
Licensed under the Apache 2.0 License. */
#ifndef __KREMLIN_TARGET_H
#define __KREMLIN_TARGET_H
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <inttypes.h>
#include <limits.h>
#include "kremlin/internal/callconv.h"
/******************************************************************************/
/* Macros that KreMLin will generate. */
/******************************************************************************/
/* For "bare" targets that do not have a C stdlib, the user might want to use
* [-add-early-include '"mydefinitions.h"'] and override these. */
#ifndef KRML_HOST_PRINTF
# define KRML_HOST_PRINTF printf
#endif
#if ( \
(defined __STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \
(!(defined KRML_HOST_EPRINTF)))
# define KRML_HOST_EPRINTF(...) fprintf(stderr, __VA_ARGS__)
#endif
#ifndef KRML_HOST_EXIT
# define KRML_HOST_EXIT exit
#endif
#ifndef KRML_HOST_MALLOC
# define KRML_HOST_MALLOC malloc
#endif
#ifndef KRML_HOST_CALLOC
# define KRML_HOST_CALLOC calloc
#endif
#ifndef KRML_HOST_FREE
# define KRML_HOST_FREE free
#endif
#ifndef KRML_HOST_TIME
# include <time.h>
/* Prims_nat not yet in scope */
inline static int32_t krml_time() {
return (int32_t)time(NULL);
}
# define KRML_HOST_TIME krml_time
#endif
/* In statement position, exiting is easy. */
#define KRML_EXIT \
do { \
KRML_HOST_PRINTF("Unimplemented function at %s:%d\n", __FILE__, __LINE__); \
KRML_HOST_EXIT(254); \
} while (0)
/* In expression position, use the comma-operator and a malloc to return an
* expression of the right size. KreMLin passes t as the parameter to the macro.
*/
#define KRML_EABORT(t, msg) \
(KRML_HOST_PRINTF("KreMLin abort at %s:%d\n%s\n", __FILE__, __LINE__, msg), \
KRML_HOST_EXIT(255), *((t *)KRML_HOST_MALLOC(sizeof(t))))
/* In FStar.Buffer.fst, the size of arrays is uint32_t, but it's a number of
* *elements*. Do an ugly, run-time check (some of which KreMLin can eliminate).
*/
#ifdef __GNUC__
# define _KRML_CHECK_SIZE_PRAGMA \
_Pragma("GCC diagnostic ignored \"-Wtype-limits\"")
#else
# define _KRML_CHECK_SIZE_PRAGMA
#endif
#define KRML_CHECK_SIZE(size_elt, sz) \
do { \
_KRML_CHECK_SIZE_PRAGMA \
if (((size_t)(sz)) > ((size_t)(SIZE_MAX / (size_elt)))) { \
KRML_HOST_PRINTF( \
"Maximum allocatable size exceeded, aborting before overflow at " \
"%s:%d\n", \
__FILE__, __LINE__); \
KRML_HOST_EXIT(253); \
} \
} while (0)
#if defined(_MSC_VER) && _MSC_VER < 1900
# define KRML_HOST_SNPRINTF(buf, sz, fmt, arg) _snprintf_s(buf, sz, _TRUNCATE, fmt, arg)
#else
# define KRML_HOST_SNPRINTF(buf, sz, fmt, arg) snprintf(buf, sz, fmt, arg)
#endif
#endif

61
3rdparty/evercrypt/kremlin/include/kremlin/internal/types.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,61 @@
/* Copyright (c) INRIA and Microsoft Corporation. All rights reserved.
Licensed under the Apache 2.0 License. */
#ifndef KRML_TYPES_H
#define KRML_TYPES_H
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
/* Types which are either abstract, meaning that have to be implemented in C, or
* which are models, meaning that they are swapped out at compile-time for
* hand-written C types (in which case they're marked as noextract). */
typedef uint64_t FStar_UInt64_t, FStar_UInt64_t_;
typedef int64_t FStar_Int64_t, FStar_Int64_t_;
typedef uint32_t FStar_UInt32_t, FStar_UInt32_t_;
typedef int32_t FStar_Int32_t, FStar_Int32_t_;
typedef uint16_t FStar_UInt16_t, FStar_UInt16_t_;
typedef int16_t FStar_Int16_t, FStar_Int16_t_;
typedef uint8_t FStar_UInt8_t, FStar_UInt8_t_;
typedef int8_t FStar_Int8_t, FStar_Int8_t_;
/* Only useful when building Kremlib, because it's in the dependency graph of
* FStar.Int.Cast. */
typedef uint64_t FStar_UInt63_t, FStar_UInt63_t_;
typedef int64_t FStar_Int63_t, FStar_Int63_t_;
typedef double FStar_Float_float;
typedef uint32_t FStar_Char_char;
typedef FILE *FStar_IO_fd_read, *FStar_IO_fd_write;
typedef void *FStar_Dyn_dyn;
typedef const char *C_String_t, *C_String_t_, *C_Compat_String_t, *C_Compat_String_t_;
typedef int exit_code;
typedef FILE *channel;
typedef unsigned long long TestLib_cycles;
typedef uint64_t FStar_Date_dateTime, FStar_Date_timeSpan;
/* The uint128 type is a special case since we offer several implementations of
* it, depending on the compiler and whether the user wants the verified
* implementation or not. */
#if !defined(KRML_VERIFIED_UINT128) && defined(_MSC_VER) && defined(_M_X64)
# include <emmintrin.h>
typedef __m128i FStar_UInt128_uint128;
#elif !defined(KRML_VERIFIED_UINT128) && !defined(_MSC_VER)
typedef unsigned __int128 FStar_UInt128_uint128;
#else
typedef struct FStar_UInt128_uint128_s {
uint64_t low;
uint64_t high;
} FStar_UInt128_uint128;
#endif
typedef FStar_UInt128_uint128 FStar_UInt128_t, FStar_UInt128_t_, uint128_t;
#endif

Просмотреть файл

@ -0,0 +1,5 @@
/* Copyright (c) INRIA and Microsoft Corporation. All rights reserved.
Licensed under the Apache 2.0 License. */
/* This file is automatically included when compiling with -wasm -d force-c */
#define WasmSupport_check_buffer_size(X)

31
3rdparty/evercrypt/kremlin/kremlib/C.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,31 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __C_H
#define __C_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern void portable_exit(int32_t x0);
extern intptr_t nullptr;
extern char char_of_uint8(uint8_t x0);
extern uint8_t uint8_of_char(char x0);
extern bool uu___is_EXIT_SUCCESS(exit_code x0);
extern bool uu___is_EXIT_FAILURE(exit_code x0);
extern void print_bytes(uint8_t *x0, uint32_t x1);
#define __C_H_DEFINED
#endif

35
3rdparty/evercrypt/kremlin/kremlib/C_Endianness.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,35 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __C_Endianness_H
#define __C_Endianness_H
#include "FStar_UInt128.h"
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern FStar_UInt128_uint128 load128_le(uint8_t *x0);
extern void store128_le(uint8_t *x0, FStar_UInt128_uint128 x1);
extern FStar_UInt128_uint128 load128_be(uint8_t *x0);
extern void store128_be(uint8_t *x0, FStar_UInt128_uint128 x1);
extern uint32_t index_32_be(uint8_t *x0, uint32_t x1);
extern uint32_t index_32_le(uint8_t *x0, uint32_t x1);
extern uint64_t index_64_be(uint8_t *x0, uint32_t x1);
extern uint64_t index_64_le(uint8_t *x0, uint32_t x1);
extern void upd_32_be(uint8_t *x0, uint32_t x1, uint32_t x2);
#define __C_Endianness_H_DEFINED
#endif

19
3rdparty/evercrypt/kremlin/kremlib/C_Failure.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,19 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __C_Failure_H
#define __C_Failure_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern bool C_Failure_whatever();
#define __C_Failure_H_DEFINED
#endif

36
3rdparty/evercrypt/kremlin/kremlib/C_Loops.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,36 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __C_Loops_H
#define __C_Loops_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern void C_Loops_for_(uint32_t x0, uint32_t x1, void (*x2)(uint32_t x0));
extern void C_Loops_for64(uint64_t x0, uint64_t x1, void (*x2)(uint64_t x0));
extern void C_Loops_reverse_for(uint32_t x0, uint32_t x1, void (*x2)(uint32_t x0));
typedef struct K___uint32_t_bool_s
{
uint32_t fst;
bool snd;
}
K___uint32_t_bool;
extern K___uint32_t_bool
C_Loops_interruptible_for(uint32_t x0, uint32_t x1, bool (*x2)(uint32_t x0));
extern K___uint32_t_bool
C_Loops_interruptible_reverse_for(uint32_t x0, uint32_t x1, bool (*x2)(uint32_t x0));
#define __C_Loops_H_DEFINED
#endif

23
3rdparty/evercrypt/kremlin/kremlib/C_String.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,23 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __C_String_H
#define __C_String_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern void C_String_print(C_String_t x0);
extern uint32_t C_String_strlen(C_String_t x0);
extern void C_String_memcpy(uint8_t *x0, C_String_t x1, uint32_t x2);
#define __C_String_H_DEFINED
#endif

19
3rdparty/evercrypt/kremlin/kremlib/FStar_All.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,19 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_All_H
#define __FStar_All_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
typedef void *FStar_All_all_pre;
#define __FStar_All_H_DEFINED
#endif

70
3rdparty/evercrypt/kremlin/kremlib/FStar_BitVector.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,70 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_BitVector_H
#define __FStar_BitVector_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
typedef struct Prims_list__bool_s Prims_list__bool;
#define Prims_Nil 0
#define Prims_Cons 1
typedef uint8_t Prims_list__bool_tags;
typedef struct Prims_list__bool_s
{
Prims_list__bool_tags tag;
bool hd;
Prims_list__bool *tl;
}
Prims_list__bool;
typedef struct FStar_Seq_Base_seq__bool_s { Prims_list__bool *l; } FStar_Seq_Base_seq__bool;
extern FStar_Seq_Base_seq__bool FStar_BitVector_zero_vec(Prims_pos x0);
extern FStar_Seq_Base_seq__bool FStar_BitVector_elem_vec(Prims_pos x0, Prims_int x1);
extern FStar_Seq_Base_seq__bool FStar_BitVector_ones_vec(Prims_pos x0);
extern FStar_Seq_Base_seq__bool
FStar_BitVector_logand_vec(
Prims_pos x0,
FStar_Seq_Base_seq__bool x1,
FStar_Seq_Base_seq__bool x2
);
extern FStar_Seq_Base_seq__bool
FStar_BitVector_logxor_vec(
Prims_pos x0,
FStar_Seq_Base_seq__bool x1,
FStar_Seq_Base_seq__bool x2
);
extern FStar_Seq_Base_seq__bool
FStar_BitVector_logor_vec(
Prims_pos x0,
FStar_Seq_Base_seq__bool x1,
FStar_Seq_Base_seq__bool x2
);
extern FStar_Seq_Base_seq__bool
FStar_BitVector_lognot_vec(Prims_pos x0, FStar_Seq_Base_seq__bool x1);
extern FStar_Seq_Base_seq__bool
FStar_BitVector_shift_left_vec(Prims_pos x0, FStar_Seq_Base_seq__bool x1, Prims_int x2);
extern FStar_Seq_Base_seq__bool
FStar_BitVector_shift_right_vec(Prims_pos x0, FStar_Seq_Base_seq__bool x1, Prims_int x2);
#define __FStar_BitVector_H_DEFINED
#endif

134
3rdparty/evercrypt/kremlin/kremlib/FStar_Bytes.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,134 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Bytes_H
#define __FStar_Bytes_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
typedef uint8_t FStar_Bytes_u8;
typedef uint16_t FStar_Bytes_u16;
typedef uint32_t FStar_Bytes_u32;
typedef uint8_t FStar_Bytes_byte;
extern uint32_t FStar_Bytes_len(FStar_Bytes_bytes x0);
extern Prims_int FStar_Bytes_length(FStar_Bytes_bytes x0);
extern FStar_Bytes_bytes FStar_Bytes_empty_bytes;
extern uint8_t FStar_Bytes_get(FStar_Bytes_bytes x0, uint32_t x1);
extern uint8_t FStar_Bytes_op_String_Access(FStar_Bytes_bytes x0, uint32_t x1);
extern uint8_t FStar_Bytes_index(FStar_Bytes_bytes x0, Prims_int x1);
extern FStar_Bytes_bytes FStar_Bytes_create(uint32_t x0, uint8_t x1);
extern FStar_Bytes_bytes FStar_Bytes_create_(Prims_int x0, uint8_t x1);
extern FStar_Bytes_bytes FStar_Bytes_init(uint32_t x0, uint8_t (*x1)(uint32_t x0));
extern FStar_Bytes_bytes FStar_Bytes_abyte(uint8_t x0);
typedef struct K___uint8_t_uint8_t_s
{
uint8_t fst;
uint8_t snd;
}
K___uint8_t_uint8_t;
extern FStar_Bytes_bytes FStar_Bytes_twobytes(K___uint8_t_uint8_t x0);
extern FStar_Bytes_bytes FStar_Bytes_append(FStar_Bytes_bytes x0, FStar_Bytes_bytes x1);
extern FStar_Bytes_bytes FStar_Bytes_op_At_Bar(FStar_Bytes_bytes x0, FStar_Bytes_bytes x1);
extern FStar_Bytes_bytes FStar_Bytes_slice(FStar_Bytes_bytes x0, uint32_t x1, uint32_t x2);
extern FStar_Bytes_bytes FStar_Bytes_slice_(FStar_Bytes_bytes x0, Prims_int x1, Prims_int x2);
extern FStar_Bytes_bytes FStar_Bytes_sub(FStar_Bytes_bytes x0, uint32_t x1, uint32_t x2);
typedef struct K___FStar_Bytes_bytes_FStar_Bytes_bytes_s
{
FStar_Bytes_bytes fst;
FStar_Bytes_bytes snd;
}
K___FStar_Bytes_bytes_FStar_Bytes_bytes;
extern K___FStar_Bytes_bytes_FStar_Bytes_bytes
FStar_Bytes_split(FStar_Bytes_bytes x0, uint32_t x1);
extern K___FStar_Bytes_bytes_FStar_Bytes_bytes
FStar_Bytes_split_(FStar_Bytes_bytes x0, Prims_int x1);
extern Prims_pos FStar_Bytes_repr_bytes(Prims_int x0);
extern Prims_int FStar_Bytes_int_of_bytes(FStar_Bytes_bytes x0);
extern FStar_Bytes_bytes FStar_Bytes_bytes_of_int(Prims_int x0, Prims_int x1);
extern uint32_t FStar_Bytes_int32_of_bytes(FStar_Bytes_bytes x0);
extern uint16_t FStar_Bytes_int16_of_bytes(FStar_Bytes_bytes x0);
extern uint8_t FStar_Bytes_int8_of_bytes(FStar_Bytes_bytes x0);
extern FStar_Bytes_bytes FStar_Bytes_bytes_of_int32(uint32_t x0);
extern FStar_Bytes_bytes FStar_Bytes_bytes_of_int16(uint16_t x0);
extern FStar_Bytes_bytes FStar_Bytes_bytes_of_int8(uint8_t x0);
extern FStar_Bytes_bytes
FStar_Bytes_xor(uint32_t x0, FStar_Bytes_bytes x1, FStar_Bytes_bytes x2);
extern FStar_Bytes_bytes
FStar_Bytes_xor_(Prims_int x0, FStar_Bytes_bytes x1, FStar_Bytes_bytes x2);
extern FStar_Bytes_bytes FStar_Bytes_utf8_encode(Prims_string x0);
#define FStar_Pervasives_Native_None 0
#define FStar_Pervasives_Native_Some 1
typedef uint8_t FStar_Pervasives_Native_option__Prims_string_tags;
typedef struct FStar_Pervasives_Native_option__Prims_string_s
{
FStar_Pervasives_Native_option__Prims_string_tags tag;
Prims_string v;
}
FStar_Pervasives_Native_option__Prims_string;
extern FStar_Pervasives_Native_option__Prims_string
FStar_Bytes_iutf8_opt(FStar_Bytes_bytes x0);
extern Prims_string FStar_Bytes_string_of_hex(Prims_string x0);
extern FStar_Bytes_bytes FStar_Bytes_bytes_of_hex(Prims_string x0);
extern Prims_string FStar_Bytes_hex_of_string(Prims_string x0);
extern Prims_string FStar_Bytes_hex_of_bytes(FStar_Bytes_bytes x0);
extern Prims_string FStar_Bytes_print_bytes(FStar_Bytes_bytes x0);
extern FStar_Bytes_bytes FStar_Bytes_bytes_of_string(Prims_string x0);
extern FStar_Bytes_bytes FStar_Bytes_of_buffer(uint32_t x0, uint8_t *x1);
extern void FStar_Bytes_store_bytes(FStar_Bytes_bytes x0, uint8_t *x1);
#define __FStar_Bytes_H_DEFINED
#endif

31
3rdparty/evercrypt/kremlin/kremlib/FStar_Char.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,31 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Char_H
#define __FStar_Char_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern FStar_Char_char FStar_Char_lowercase(FStar_Char_char x0);
extern FStar_Char_char FStar_Char_uppercase(FStar_Char_char x0);
typedef uint32_t FStar_Char_char_code;
extern uint32_t FStar_Char_u32_of_char(FStar_Char_char x0);
extern FStar_Char_char FStar_Char_char_of_u32(uint32_t x0);
extern Prims_int FStar_Char_int_of_char(FStar_Char_char x0);
extern FStar_Char_char FStar_Char_char_of_int(Prims_int x0);
#define __FStar_Char_H_DEFINED
#endif

29
3rdparty/evercrypt/kremlin/kremlib/FStar_Date.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,29 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Date_H
#define __FStar_Date_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern FStar_Date_dateTime FStar_Date_now();
extern Prims_int FStar_Date_secondsFromDawn();
extern FStar_Date_timeSpan
FStar_Date_newTimeSpan(Prims_int x0, Prims_int x1, Prims_int x2, Prims_int x3);
extern FStar_Date_dateTime
FStar_Date_addTimeSpan(FStar_Date_dateTime x0, FStar_Date_timeSpan x1);
extern bool FStar_Date_greaterDateTime(FStar_Date_dateTime x0, FStar_Date_dateTime x1);
#define __FStar_Date_H_DEFINED
#endif

19
3rdparty/evercrypt/kremlin/kremlib/FStar_Float.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,19 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Float_H
#define __FStar_Float_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
typedef FStar_Float_float FStar_Float_double;
#define __FStar_Float_H_DEFINED
#endif

19
3rdparty/evercrypt/kremlin/kremlib/FStar_HyperStack_All.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,19 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_HyperStack_All_H
#define __FStar_HyperStack_All_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
typedef void *FStar_HyperStack_All_all_pre;
#define __FStar_HyperStack_All_H_DEFINED
#endif

19
3rdparty/evercrypt/kremlin/kremlib/FStar_HyperStack_IO.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,19 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_HyperStack_IO_H
#define __FStar_HyperStack_IO_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern void FStar_HyperStack_IO_print_string(Prims_string x0);
#define __FStar_HyperStack_IO_H_DEFINED
#endif

21
3rdparty/evercrypt/kremlin/kremlib/FStar_HyperStack_ST.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,21 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_HyperStack_ST_H
#define __FStar_HyperStack_ST_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
typedef void *FStar_HyperStack_ST_erid;
typedef void *FStar_HyperStack_ST_ex_rid;
#define __FStar_HyperStack_ST_H_DEFINED
#endif

65
3rdparty/evercrypt/kremlin/kremlib/FStar_IO.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,65 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_IO_H
#define __FStar_IO_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern void FStar_IO_print_newline();
extern void FStar_IO_print_string(Prims_string x0);
extern void FStar_IO_print_uint8(uint8_t x0);
extern void FStar_IO_print_uint8_dec(uint8_t x0);
extern void FStar_IO_print_uint32(uint32_t x0);
extern void FStar_IO_print_uint32_dec(uint32_t x0);
extern void FStar_IO_print_uint64(uint64_t x0);
extern void FStar_IO_print_uint64_dec(uint64_t x0);
extern void FStar_IO_print_uint8_hex_pad(uint8_t x0);
extern void FStar_IO_print_uint8_dec_pad(uint8_t x0);
extern void FStar_IO_print_uint32_hex_pad(uint32_t x0);
extern void FStar_IO_print_uint32_dec_pad(uint32_t x0);
extern void FStar_IO_print_uint64_hex_pad(uint64_t x0);
extern void FStar_IO_print_uint64_dec_pad(uint64_t x0);
extern Prims_string FStar_IO_input_line();
extern Prims_int FStar_IO_input_int();
extern FStar_Float_float FStar_IO_input_float();
extern FStar_IO_fd_read FStar_IO_open_read_file(Prims_string x0);
extern FStar_IO_fd_write FStar_IO_open_write_file(Prims_string x0);
extern void FStar_IO_close_read_file(FStar_IO_fd_read x0);
extern void FStar_IO_close_write_file(FStar_IO_fd_write x0);
extern Prims_string FStar_IO_read_line(FStar_IO_fd_read x0);
extern void FStar_IO_write_string(FStar_IO_fd_write x0, Prims_string x1);
extern bool FStar_IO_debug_print_string(Prims_string x0);
#define __FStar_IO_H_DEFINED
#endif

71
3rdparty/evercrypt/kremlin/kremlib/FStar_Int.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,71 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Int_H
#define __FStar_Int_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern Prims_int FStar_Int_op_Slash(Prims_int x0, Prims_int x1);
extern Prims_int FStar_Int_div_eucl(Prims_int x0, Prims_nonzero x1);
extern Prims_int FStar_Int_op_Slash_Percent(Prims_int x0, Prims_nonzero x1);
extern Prims_int FStar_Int_op_At_Percent(Prims_int x0, Prims_int x1);
extern Prims_int FStar_Int_max_int(Prims_pos x0);
extern Prims_int FStar_Int_min_int(Prims_pos x0);
extern bool FStar_Int_fits(Prims_int x0, Prims_pos x1);
extern Prims_int FStar_Int_add(Prims_pos x0, Prims_int x1, Prims_int x2);
extern Prims_int FStar_Int_add_mod(Prims_pos x0, Prims_int x1, Prims_int x2);
extern Prims_int FStar_Int_sub(Prims_pos x0, Prims_int x1, Prims_int x2);
extern Prims_int FStar_Int_sub_mod(Prims_pos x0, Prims_int x1, Prims_int x2);
extern Prims_int FStar_Int_mul(Prims_pos x0, Prims_int x1, Prims_int x2);
extern Prims_int FStar_Int_mul_mod(Prims_pos x0, Prims_int x1, Prims_int x2);
extern Prims_int FStar_Int_div(Prims_pos x0, Prims_int x1, Prims_int x2);
extern Prims_int FStar_Int_mod_(Prims_pos x0, Prims_int x1, Prims_int x2);
extern Prims_int FStar_Int_logand(Prims_pos x0, Prims_int x1, Prims_int x2);
extern Prims_int FStar_Int_logxor(Prims_pos x0, Prims_int x1, Prims_int x2);
extern Prims_int FStar_Int_logor(Prims_pos x0, Prims_int x1, Prims_int x2);
extern Prims_int FStar_Int_lognot(Prims_pos x0, Prims_int x1);
extern bool FStar_Int_eq(Prims_pos x0, Prims_int x1, Prims_int x2);
extern bool FStar_Int_gt(Prims_pos x0, Prims_int x1, Prims_int x2);
extern bool FStar_Int_gte(Prims_pos x0, Prims_int x1, Prims_int x2);
extern bool FStar_Int_lt(Prims_pos x0, Prims_int x1, Prims_int x2);
extern bool FStar_Int_lte(Prims_pos x0, Prims_int x1, Prims_int x2);
extern Prims_int FStar_Int_to_int_t(Prims_pos x0, Prims_int x1);
extern Prims_int FStar_Int_shift_right(Prims_pos x0, Prims_int x1, Prims_int x2);
extern Prims_int FStar_Int_shift_left(Prims_pos x0, Prims_int x1, Prims_int x2);
#define __FStar_Int_H_DEFINED
#endif

59
3rdparty/evercrypt/kremlin/kremlib/FStar_Int16.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,59 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Int16_H
#define __FStar_Int16_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern Prims_int FStar_Int16_n;
extern Prims_int FStar_Int16_v(int16_t x0);
extern int16_t FStar_Int16_int_to_t(Prims_int x0);
extern int16_t FStar_Int16_add(int16_t x0, int16_t x1);
extern int16_t FStar_Int16_sub(int16_t x0, int16_t x1);
extern int16_t FStar_Int16_mul(int16_t x0, int16_t x1);
extern int16_t FStar_Int16_div(int16_t x0, int16_t x1);
extern int16_t FStar_Int16_rem(int16_t x0, int16_t x1);
extern int16_t FStar_Int16_logand(int16_t x0, int16_t x1);
extern int16_t FStar_Int16_logxor(int16_t x0, int16_t x1);
extern int16_t FStar_Int16_logor(int16_t x0, int16_t x1);
extern int16_t FStar_Int16_lognot(int16_t x0);
extern int16_t FStar_Int16_shift_right(int16_t x0, uint32_t x1);
extern int16_t FStar_Int16_shift_left(int16_t x0, uint32_t x1);
extern bool FStar_Int16_eq(int16_t x0, int16_t x1);
extern bool FStar_Int16_gt(int16_t x0, int16_t x1);
extern bool FStar_Int16_gte(int16_t x0, int16_t x1);
extern bool FStar_Int16_lt(int16_t x0, int16_t x1);
extern bool FStar_Int16_lte(int16_t x0, int16_t x1);
extern Prims_string FStar_Int16_to_string(int16_t x0);
extern int16_t FStar_Int16_of_string(Prims_string x0);
#define __FStar_Int16_H_DEFINED
#endif

59
3rdparty/evercrypt/kremlin/kremlib/FStar_Int32.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,59 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Int32_H
#define __FStar_Int32_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern Prims_int FStar_Int32_n;
extern Prims_int FStar_Int32_v(int32_t x0);
extern int32_t FStar_Int32_int_to_t(Prims_int x0);
extern int32_t FStar_Int32_add(int32_t x0, int32_t x1);
extern int32_t FStar_Int32_sub(int32_t x0, int32_t x1);
extern int32_t FStar_Int32_mul(int32_t x0, int32_t x1);
extern int32_t FStar_Int32_div(int32_t x0, int32_t x1);
extern int32_t FStar_Int32_rem(int32_t x0, int32_t x1);
extern int32_t FStar_Int32_logand(int32_t x0, int32_t x1);
extern int32_t FStar_Int32_logxor(int32_t x0, int32_t x1);
extern int32_t FStar_Int32_logor(int32_t x0, int32_t x1);
extern int32_t FStar_Int32_lognot(int32_t x0);
extern int32_t FStar_Int32_shift_right(int32_t x0, uint32_t x1);
extern int32_t FStar_Int32_shift_left(int32_t x0, uint32_t x1);
extern bool FStar_Int32_eq(int32_t x0, int32_t x1);
extern bool FStar_Int32_gt(int32_t x0, int32_t x1);
extern bool FStar_Int32_gte(int32_t x0, int32_t x1);
extern bool FStar_Int32_lt(int32_t x0, int32_t x1);
extern bool FStar_Int32_lte(int32_t x0, int32_t x1);
extern Prims_string FStar_Int32_to_string(int32_t x0);
extern int32_t FStar_Int32_of_string(Prims_string x0);
#define __FStar_Int32_H_DEFINED
#endif

59
3rdparty/evercrypt/kremlin/kremlib/FStar_Int63.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,59 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Int63_H
#define __FStar_Int63_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern Prims_int FStar_Int63_n;
extern Prims_int FStar_Int63_v(FStar_Int63_t x0);
extern FStar_Int63_t FStar_Int63_int_to_t(Prims_int x0);
extern FStar_Int63_t FStar_Int63_add(FStar_Int63_t x0, FStar_Int63_t x1);
extern FStar_Int63_t FStar_Int63_sub(FStar_Int63_t x0, FStar_Int63_t x1);
extern FStar_Int63_t FStar_Int63_mul(FStar_Int63_t x0, FStar_Int63_t x1);
extern FStar_Int63_t FStar_Int63_div(FStar_Int63_t x0, FStar_Int63_t x1);
extern FStar_Int63_t FStar_Int63_rem(FStar_Int63_t x0, FStar_Int63_t x1);
extern FStar_Int63_t FStar_Int63_logand(FStar_Int63_t x0, FStar_Int63_t x1);
extern FStar_Int63_t FStar_Int63_logxor(FStar_Int63_t x0, FStar_Int63_t x1);
extern FStar_Int63_t FStar_Int63_logor(FStar_Int63_t x0, FStar_Int63_t x1);
extern FStar_Int63_t FStar_Int63_lognot(FStar_Int63_t x0);
extern FStar_Int63_t FStar_Int63_shift_right(FStar_Int63_t x0, uint32_t x1);
extern FStar_Int63_t FStar_Int63_shift_left(FStar_Int63_t x0, uint32_t x1);
extern bool FStar_Int63_eq(FStar_Int63_t x0, FStar_Int63_t x1);
extern bool FStar_Int63_gt(FStar_Int63_t x0, FStar_Int63_t x1);
extern bool FStar_Int63_gte(FStar_Int63_t x0, FStar_Int63_t x1);
extern bool FStar_Int63_lt(FStar_Int63_t x0, FStar_Int63_t x1);
extern bool FStar_Int63_lte(FStar_Int63_t x0, FStar_Int63_t x1);
extern Prims_string FStar_Int63_to_string(FStar_Int63_t x0);
extern FStar_Int63_t FStar_Int63_of_string(Prims_string x0);
#define __FStar_Int63_H_DEFINED
#endif

59
3rdparty/evercrypt/kremlin/kremlib/FStar_Int64.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,59 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Int64_H
#define __FStar_Int64_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern Prims_int FStar_Int64_n;
extern Prims_int FStar_Int64_v(int64_t x0);
extern int64_t FStar_Int64_int_to_t(Prims_int x0);
extern int64_t FStar_Int64_add(int64_t x0, int64_t x1);
extern int64_t FStar_Int64_sub(int64_t x0, int64_t x1);
extern int64_t FStar_Int64_mul(int64_t x0, int64_t x1);
extern int64_t FStar_Int64_div(int64_t x0, int64_t x1);
extern int64_t FStar_Int64_rem(int64_t x0, int64_t x1);
extern int64_t FStar_Int64_logand(int64_t x0, int64_t x1);
extern int64_t FStar_Int64_logxor(int64_t x0, int64_t x1);
extern int64_t FStar_Int64_logor(int64_t x0, int64_t x1);
extern int64_t FStar_Int64_lognot(int64_t x0);
extern int64_t FStar_Int64_shift_right(int64_t x0, uint32_t x1);
extern int64_t FStar_Int64_shift_left(int64_t x0, uint32_t x1);
extern bool FStar_Int64_eq(int64_t x0, int64_t x1);
extern bool FStar_Int64_gt(int64_t x0, int64_t x1);
extern bool FStar_Int64_gte(int64_t x0, int64_t x1);
extern bool FStar_Int64_lt(int64_t x0, int64_t x1);
extern bool FStar_Int64_lte(int64_t x0, int64_t x1);
extern Prims_string FStar_Int64_to_string(int64_t x0);
extern int64_t FStar_Int64_of_string(Prims_string x0);
#define __FStar_Int64_H_DEFINED
#endif

59
3rdparty/evercrypt/kremlin/kremlib/FStar_Int8.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,59 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Int8_H
#define __FStar_Int8_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern Prims_int FStar_Int8_n;
extern Prims_int FStar_Int8_v(int8_t x0);
extern int8_t FStar_Int8_int_to_t(Prims_int x0);
extern int8_t FStar_Int8_add(int8_t x0, int8_t x1);
extern int8_t FStar_Int8_sub(int8_t x0, int8_t x1);
extern int8_t FStar_Int8_mul(int8_t x0, int8_t x1);
extern int8_t FStar_Int8_div(int8_t x0, int8_t x1);
extern int8_t FStar_Int8_rem(int8_t x0, int8_t x1);
extern int8_t FStar_Int8_logand(int8_t x0, int8_t x1);
extern int8_t FStar_Int8_logxor(int8_t x0, int8_t x1);
extern int8_t FStar_Int8_logor(int8_t x0, int8_t x1);
extern int8_t FStar_Int8_lognot(int8_t x0);
extern int8_t FStar_Int8_shift_right(int8_t x0, uint32_t x1);
extern int8_t FStar_Int8_shift_left(int8_t x0, uint32_t x1);
extern bool FStar_Int8_eq(int8_t x0, int8_t x1);
extern bool FStar_Int8_gt(int8_t x0, int8_t x1);
extern bool FStar_Int8_gte(int8_t x0, int8_t x1);
extern bool FStar_Int8_lt(int8_t x0, int8_t x1);
extern bool FStar_Int8_lte(int8_t x0, int8_t x1);
extern Prims_string FStar_Int8_to_string(int8_t x0);
extern int8_t FStar_Int8_of_string(Prims_string x0);
#define __FStar_Int8_H_DEFINED
#endif

197
3rdparty/evercrypt/kremlin/kremlib/FStar_Int_Cast.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,197 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Int_Cast_H
#define __FStar_Int_Cast_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern uint64_t FStar_Int_Cast_uint8_to_uint64(uint8_t x0);
extern FStar_UInt63_t FStar_Int_Cast_uint8_to_uint63(uint8_t x0);
extern uint32_t FStar_Int_Cast_uint8_to_uint32(uint8_t x0);
extern uint16_t FStar_Int_Cast_uint8_to_uint16(uint8_t x0);
extern uint64_t FStar_Int_Cast_uint16_to_uint64(uint16_t x0);
extern FStar_UInt63_t FStar_Int_Cast_uint16_to_uint63(uint16_t x0);
extern uint32_t FStar_Int_Cast_uint16_to_uint32(uint16_t x0);
extern uint8_t FStar_Int_Cast_uint16_to_uint8(uint16_t x0);
extern uint64_t FStar_Int_Cast_uint32_to_uint64(uint32_t x0);
extern FStar_UInt63_t FStar_Int_Cast_uint32_to_uint63(uint32_t x0);
extern uint16_t FStar_Int_Cast_uint32_to_uint16(uint32_t x0);
extern uint8_t FStar_Int_Cast_uint32_to_uint8(uint32_t x0);
extern uint64_t FStar_Int_Cast_uint63_to_uint64(FStar_UInt63_t x0);
extern uint32_t FStar_Int_Cast_uint63_to_uint32(FStar_UInt63_t x0);
extern uint16_t FStar_Int_Cast_uint63_to_uint16(FStar_UInt63_t x0);
extern uint8_t FStar_Int_Cast_uint63_to_uint8(FStar_UInt63_t x0);
extern FStar_UInt63_t FStar_Int_Cast_uint64_to_uint63(uint64_t x0);
extern uint32_t FStar_Int_Cast_uint64_to_uint32(uint64_t x0);
extern uint16_t FStar_Int_Cast_uint64_to_uint16(uint64_t x0);
extern uint8_t FStar_Int_Cast_uint64_to_uint8(uint64_t x0);
extern int64_t FStar_Int_Cast_int8_to_int64(int8_t x0);
extern FStar_Int63_t FStar_Int_Cast_int8_to_int63(int8_t x0);
extern int32_t FStar_Int_Cast_int8_to_int32(int8_t x0);
extern int16_t FStar_Int_Cast_int8_to_int16(int8_t x0);
extern int64_t FStar_Int_Cast_int16_to_int64(int16_t x0);
extern FStar_Int63_t FStar_Int_Cast_int16_to_int63(int16_t x0);
extern int32_t FStar_Int_Cast_int16_to_int32(int16_t x0);
extern int8_t FStar_Int_Cast_int16_to_int8(int16_t x0);
extern int64_t FStar_Int_Cast_int32_to_int64(int32_t x0);
extern FStar_Int63_t FStar_Int_Cast_int32_to_int63(int32_t x0);
extern int16_t FStar_Int_Cast_int32_to_int16(int32_t x0);
extern int8_t FStar_Int_Cast_int32_to_int8(int32_t x0);
extern int64_t FStar_Int_Cast_int63_to_int64(FStar_Int63_t x0);
extern int32_t FStar_Int_Cast_int63_to_int32(FStar_Int63_t x0);
extern int16_t FStar_Int_Cast_int63_to_int16(FStar_Int63_t x0);
extern int8_t FStar_Int_Cast_int63_to_int8(FStar_Int63_t x0);
extern FStar_Int63_t FStar_Int_Cast_int64_to_int63(int64_t x0);
extern int32_t FStar_Int_Cast_int64_to_int32(int64_t x0);
extern int16_t FStar_Int_Cast_int64_to_int16(int64_t x0);
extern int8_t FStar_Int_Cast_int64_to_int8(int64_t x0);
extern int64_t FStar_Int_Cast_uint8_to_int64(uint8_t x0);
extern FStar_Int63_t FStar_Int_Cast_uint8_to_int63(uint8_t x0);
extern int32_t FStar_Int_Cast_uint8_to_int32(uint8_t x0);
extern int16_t FStar_Int_Cast_uint8_to_int16(uint8_t x0);
extern int8_t FStar_Int_Cast_uint8_to_int8(uint8_t x0);
extern int64_t FStar_Int_Cast_uint16_to_int64(uint16_t x0);
extern FStar_Int63_t FStar_Int_Cast_uint16_to_int63(uint16_t x0);
extern int32_t FStar_Int_Cast_uint16_to_int32(uint16_t x0);
extern int16_t FStar_Int_Cast_uint16_to_int16(uint16_t x0);
extern int8_t FStar_Int_Cast_uint16_to_int8(uint16_t x0);
extern int64_t FStar_Int_Cast_uint32_to_int64(uint32_t x0);
extern FStar_Int63_t FStar_Int_Cast_uint32_to_int63(uint32_t x0);
extern int32_t FStar_Int_Cast_uint32_to_int32(uint32_t x0);
extern int16_t FStar_Int_Cast_uint32_to_int16(uint32_t x0);
extern int8_t FStar_Int_Cast_uint32_to_int8(uint32_t x0);
extern int64_t FStar_Int_Cast_uint63_to_int64(FStar_UInt63_t x0);
extern FStar_Int63_t FStar_Int_Cast_uint63_to_int63(FStar_UInt63_t x0);
extern int32_t FStar_Int_Cast_uint63_to_int32(FStar_UInt63_t x0);
extern int16_t FStar_Int_Cast_uint63_to_int16(FStar_UInt63_t x0);
extern int8_t FStar_Int_Cast_uint63_to_int8(FStar_UInt63_t x0);
extern int64_t FStar_Int_Cast_uint64_to_int64(uint64_t x0);
extern FStar_Int63_t FStar_Int_Cast_uint64_to_int63(uint64_t x0);
extern int32_t FStar_Int_Cast_uint64_to_int32(uint64_t x0);
extern int16_t FStar_Int_Cast_uint64_to_int16(uint64_t x0);
extern int8_t FStar_Int_Cast_uint64_to_int8(uint64_t x0);
extern uint64_t FStar_Int_Cast_int8_to_uint64(int8_t x0);
extern FStar_UInt63_t FStar_Int_Cast_int8_to_uint63(int8_t x0);
extern uint32_t FStar_Int_Cast_int8_to_uint32(int8_t x0);
extern uint16_t FStar_Int_Cast_int8_to_uint16(int8_t x0);
extern uint8_t FStar_Int_Cast_int8_to_uint8(int8_t x0);
extern uint64_t FStar_Int_Cast_int16_to_uint64(int16_t x0);
extern FStar_UInt63_t FStar_Int_Cast_int16_to_uint63(int16_t x0);
extern uint32_t FStar_Int_Cast_int16_to_uint32(int16_t x0);
extern uint16_t FStar_Int_Cast_int16_to_uint16(int16_t x0);
extern uint8_t FStar_Int_Cast_int16_to_uint8(int16_t x0);
extern uint64_t FStar_Int_Cast_int32_to_uint64(int32_t x0);
extern FStar_UInt63_t FStar_Int_Cast_int32_to_uint63(int32_t x0);
extern uint32_t FStar_Int_Cast_int32_to_uint32(int32_t x0);
extern uint16_t FStar_Int_Cast_int32_to_uint16(int32_t x0);
extern uint8_t FStar_Int_Cast_int32_to_uint8(int32_t x0);
extern uint64_t FStar_Int_Cast_int63_to_uint64(FStar_Int63_t x0);
extern FStar_UInt63_t FStar_Int_Cast_int63_to_uint63(FStar_Int63_t x0);
extern uint32_t FStar_Int_Cast_int63_to_uint32(FStar_Int63_t x0);
extern uint16_t FStar_Int_Cast_int63_to_uint16(FStar_Int63_t x0);
extern uint8_t FStar_Int_Cast_int63_to_uint8(FStar_Int63_t x0);
extern uint64_t FStar_Int_Cast_int64_to_uint64(int64_t x0);
extern FStar_UInt63_t FStar_Int_Cast_int64_to_uint63(int64_t x0);
extern uint32_t FStar_Int_Cast_int64_to_uint32(int64_t x0);
extern uint16_t FStar_Int_Cast_int64_to_uint16(int64_t x0);
extern uint8_t FStar_Int_Cast_int64_to_uint8(int64_t x0);
#define __FStar_Int_Cast_H_DEFINED
#endif

21
3rdparty/evercrypt/kremlin/kremlib/FStar_Int_Cast_Full.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,21 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Int_Cast_Full_H
#define __FStar_Int_Cast_Full_H
#include "FStar_UInt128.h"
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern FStar_UInt128_uint128 FStar_Int_Cast_Full_uint64_to_uint128(uint64_t x0);
extern uint64_t FStar_Int_Cast_Full_uint128_to_uint64(FStar_UInt128_uint128 x0);
#define __FStar_Int_Cast_Full_H_DEFINED
#endif

106
3rdparty/evercrypt/kremlin/kremlib/FStar_Kremlin_Endianness.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,106 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Kremlin_Endianness_H
#define __FStar_Kremlin_Endianness_H
#include "FStar_BitVector.h"
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
typedef struct Prims_list__uint8_t_s Prims_list__uint8_t;
typedef struct Prims_list__uint8_t_s
{
Prims_list__bool_tags tag;
uint8_t hd;
Prims_list__uint8_t *tl;
}
Prims_list__uint8_t;
typedef struct FStar_Seq_Base_seq__uint8_t_s { Prims_list__uint8_t *l; }
FStar_Seq_Base_seq__uint8_t;
typedef FStar_Seq_Base_seq__uint8_t FStar_Kremlin_Endianness_bytes;
extern Prims_int FStar_Kremlin_Endianness_le_to_n(FStar_Seq_Base_seq__uint8_t x0);
extern Prims_int FStar_Kremlin_Endianness_be_to_n(FStar_Seq_Base_seq__uint8_t x0);
extern FStar_Seq_Base_seq__uint8_t FStar_Kremlin_Endianness_n_to_le(uint32_t x0, Prims_int x1);
extern FStar_Seq_Base_seq__uint8_t FStar_Kremlin_Endianness_n_to_be(uint32_t x0, Prims_int x1);
extern uint32_t FStar_Kremlin_Endianness_uint32_of_le(FStar_Seq_Base_seq__uint8_t x0);
extern FStar_Seq_Base_seq__uint8_t FStar_Kremlin_Endianness_le_of_uint32(uint32_t x0);
extern uint32_t FStar_Kremlin_Endianness_uint32_of_be(FStar_Seq_Base_seq__uint8_t x0);
extern FStar_Seq_Base_seq__uint8_t FStar_Kremlin_Endianness_be_of_uint32(uint32_t x0);
extern uint64_t FStar_Kremlin_Endianness_uint64_of_le(FStar_Seq_Base_seq__uint8_t x0);
extern FStar_Seq_Base_seq__uint8_t FStar_Kremlin_Endianness_le_of_uint64(uint64_t x0);
extern uint64_t FStar_Kremlin_Endianness_uint64_of_be(FStar_Seq_Base_seq__uint8_t x0);
extern FStar_Seq_Base_seq__uint8_t FStar_Kremlin_Endianness_be_of_uint64(uint64_t x0);
typedef struct Prims_list__uint32_t_s Prims_list__uint32_t;
typedef struct Prims_list__uint32_t_s
{
Prims_list__bool_tags tag;
uint32_t hd;
Prims_list__uint32_t *tl;
}
Prims_list__uint32_t;
typedef struct FStar_Seq_Base_seq__uint32_t_s { Prims_list__uint32_t *l; }
FStar_Seq_Base_seq__uint32_t;
extern FStar_Seq_Base_seq__uint32_t
FStar_Kremlin_Endianness_seq_uint32_of_le(Prims_int x0, FStar_Seq_Base_seq__uint8_t x1);
extern FStar_Seq_Base_seq__uint8_t
FStar_Kremlin_Endianness_le_of_seq_uint32(FStar_Seq_Base_seq__uint32_t x0);
extern FStar_Seq_Base_seq__uint32_t
FStar_Kremlin_Endianness_seq_uint32_of_be(Prims_int x0, FStar_Seq_Base_seq__uint8_t x1);
extern FStar_Seq_Base_seq__uint8_t
FStar_Kremlin_Endianness_be_of_seq_uint32(FStar_Seq_Base_seq__uint32_t x0);
typedef struct Prims_list__uint64_t_s Prims_list__uint64_t;
typedef struct Prims_list__uint64_t_s
{
Prims_list__bool_tags tag;
uint64_t hd;
Prims_list__uint64_t *tl;
}
Prims_list__uint64_t;
typedef struct FStar_Seq_Base_seq__uint64_t_s { Prims_list__uint64_t *l; }
FStar_Seq_Base_seq__uint64_t;
extern FStar_Seq_Base_seq__uint64_t
FStar_Kremlin_Endianness_seq_uint64_of_le(Prims_int x0, FStar_Seq_Base_seq__uint8_t x1);
extern FStar_Seq_Base_seq__uint8_t
FStar_Kremlin_Endianness_le_of_seq_uint64(FStar_Seq_Base_seq__uint64_t x0);
extern FStar_Seq_Base_seq__uint64_t
FStar_Kremlin_Endianness_seq_uint64_of_be(Prims_int x0, FStar_Seq_Base_seq__uint8_t x1);
extern FStar_Seq_Base_seq__uint8_t
FStar_Kremlin_Endianness_be_of_seq_uint64(FStar_Seq_Base_seq__uint64_t x0);
#define __FStar_Kremlin_Endianness_H_DEFINED
#endif

39
3rdparty/evercrypt/kremlin/kremlib/FStar_Math_Lib.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,39 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Math_Lib_H
#define __FStar_Math_Lib_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern Prims_int FStar_Math_Lib_log_2(Prims_pos x0);
extern Prims_int FStar_Math_Lib_powx(Prims_int x0, Prims_int x1);
extern Prims_int FStar_Math_Lib_abs(Prims_int x0);
extern Prims_int FStar_Math_Lib_max(Prims_int x0, Prims_int x1);
extern Prims_int FStar_Math_Lib_min(Prims_int x0, Prims_int x1);
extern Prims_int FStar_Math_Lib_div(Prims_int x0, Prims_pos x1);
extern Prims_int FStar_Math_Lib_div_non_eucl(Prims_int x0, Prims_pos x1);
extern Prims_int FStar_Math_Lib_shift_left(Prims_int x0, Prims_int x1);
extern Prims_int FStar_Math_Lib_arithmetic_shift_right(Prims_int x0, Prims_int x1);
extern Prims_int FStar_Math_Lib_signed_modulo(Prims_int x0, Prims_pos x1);
extern Prims_int FStar_Math_Lib_op_Plus_Percent(Prims_int x0, Prims_pos x1);
#define __FStar_Math_Lib_H_DEFINED
#endif

12
3rdparty/evercrypt/kremlin/kremlib/FStar_ModifiesGen.c поставляемый Normal file
Просмотреть файл

@ -0,0 +1,12 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#include "FStar_ModifiesGen.h"
#define FStar_ModifiesGen_Cls 0
typedef uint8_t FStar_ModifiesGen_cls;

19
3rdparty/evercrypt/kremlin/kremlib/FStar_ModifiesGen.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,19 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_ModifiesGen_H
#define __FStar_ModifiesGen_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
typedef void *FStar_ModifiesGen_aloc_t;
#define __FStar_ModifiesGen_H_DEFINED
#endif

65
3rdparty/evercrypt/kremlin/kremlib/FStar_Monotonic_Heap.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,65 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Monotonic_Heap_H
#define __FStar_Monotonic_Heap_H
#include "FStar_Bytes.h"
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
typedef FStar_Pervasives_Native_option__Prims_string_tags FStar_Pervasives_Native_option____;
typedef struct FStar_Pervasives_dtuple4_____FStar_Pervasives_Native_option_____bool_any_s
{
FStar_Pervasives_Native_option____ _2;
bool _3;
}
FStar_Pervasives_dtuple4_____FStar_Pervasives_Native_option_____bool_any;
typedef struct
FStar_Pervasives_Native_option__FStar_Pervasives_dtuple4_____FStar_Pervasives_Native_option_____bool_any_s
{
FStar_Pervasives_Native_option__Prims_string_tags tag;
FStar_Pervasives_dtuple4_____FStar_Pervasives_Native_option_____bool_any v;
}
FStar_Pervasives_Native_option__FStar_Pervasives_dtuple4_____FStar_Pervasives_Native_option_____bool_any;
typedef struct FStar_Monotonic_Heap_heap_rec_s
{
Prims_pos next_addr;
FStar_Pervasives_Native_option__FStar_Pervasives_dtuple4_____FStar_Pervasives_Native_option_____bool_any
(*memory)(Prims_pos x0);
}
FStar_Monotonic_Heap_heap_rec;
typedef FStar_Monotonic_Heap_heap_rec FStar_Monotonic_Heap_heap;
extern FStar_Monotonic_Heap_heap_rec FStar_Monotonic_Heap_emp;
typedef struct FStar_Monotonic_Heap_aref__s
{
Prims_int a_addr;
bool a_mm;
}
FStar_Monotonic_Heap_aref_;
extern Prims_int
FStar_Monotonic_Heap___proj__Mkaref___item__a_addr(FStar_Monotonic_Heap_aref_ x0);
extern bool FStar_Monotonic_Heap___proj__Mkaref___item__a_mm(FStar_Monotonic_Heap_aref_ x0);
typedef FStar_Monotonic_Heap_aref_ FStar_Monotonic_Heap_aref;
extern FStar_Monotonic_Heap_aref_ FStar_Monotonic_Heap_dummy_aref;
extern void
**FStar_Monotonic_Heap_ref_of(FStar_Monotonic_Heap_heap_rec x0, FStar_Monotonic_Heap_aref_ x1);
#define __FStar_Monotonic_Heap_H_DEFINED
#endif

19
3rdparty/evercrypt/kremlin/kremlib/FStar_Monotonic_HyperHeap.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,19 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Monotonic_HyperHeap_H
#define __FStar_Monotonic_HyperHeap_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
typedef void *FStar_Monotonic_HyperHeap_rid;
#define __FStar_Monotonic_HyperHeap_H_DEFINED
#endif

21
3rdparty/evercrypt/kremlin/kremlib/FStar_Monotonic_HyperStack.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,21 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Monotonic_HyperStack_H
#define __FStar_Monotonic_HyperStack_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
typedef void *FStar_Monotonic_HyperStack_mem;
extern void *FStar_Monotonic_HyperStack_root;
#define __FStar_Monotonic_HyperStack_H_DEFINED
#endif

19
3rdparty/evercrypt/kremlin/kremlib/FStar_Mul.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,19 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Mul_H
#define __FStar_Mul_H
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
extern Prims_int FStar_Mul_op_Star(Prims_int x0, Prims_int x1);
#define __FStar_Mul_H_DEFINED
#endif

267
3rdparty/evercrypt/kremlin/kremlib/FStar_Order.c поставляемый Normal file
Просмотреть файл

@ -0,0 +1,267 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#include "FStar_Order.h"
bool FStar_Order_uu___is_Lt(FStar_Order_order projectee)
{
switch (projectee)
{
case FStar_Order_Lt:
{
return true;
}
default:
{
return false;
}
}
}
bool FStar_Order_uu___is_Eq(FStar_Order_order projectee)
{
switch (projectee)
{
case FStar_Order_Eq:
{
return true;
}
default:
{
return false;
}
}
}
bool FStar_Order_uu___is_Gt(FStar_Order_order projectee)
{
switch (projectee)
{
case FStar_Order_Gt:
{
return true;
}
default:
{
return false;
}
}
}
static bool __neq__FStar_Order_order(FStar_Order_order y, FStar_Order_order x)
{
switch (x)
{
case FStar_Order_Lt:
{
switch (y)
{
case FStar_Order_Lt:
{
return false;
}
default:
{
return true;
}
}
break;
}
case FStar_Order_Eq:
{
switch (y)
{
case FStar_Order_Eq:
{
return false;
}
default:
{
return true;
}
}
break;
}
case FStar_Order_Gt:
{
switch (y)
{
case FStar_Order_Gt:
{
return false;
}
default:
{
return true;
}
}
break;
}
default:
{
return true;
}
}
}
bool FStar_Order_ge(FStar_Order_order o)
{
return __neq__FStar_Order_order(o, FStar_Order_Lt);
}
bool FStar_Order_le(FStar_Order_order o)
{
return __neq__FStar_Order_order(o, FStar_Order_Gt);
}
bool FStar_Order_ne(FStar_Order_order o)
{
return __neq__FStar_Order_order(o, FStar_Order_Eq);
}
static bool __eq__FStar_Order_order(FStar_Order_order y, FStar_Order_order x)
{
switch (x)
{
case FStar_Order_Lt:
{
switch (y)
{
case FStar_Order_Lt:
{
return true;
}
default:
{
return false;
}
}
break;
}
case FStar_Order_Eq:
{
switch (y)
{
case FStar_Order_Eq:
{
return true;
}
default:
{
return false;
}
}
break;
}
case FStar_Order_Gt:
{
switch (y)
{
case FStar_Order_Gt:
{
return true;
}
default:
{
return false;
}
}
break;
}
default:
{
return false;
}
}
}
bool FStar_Order_gt(FStar_Order_order o)
{
return __eq__FStar_Order_order(o, FStar_Order_Gt);
}
bool FStar_Order_lt(FStar_Order_order o)
{
return __eq__FStar_Order_order(o, FStar_Order_Lt);
}
bool FStar_Order_eq(FStar_Order_order o)
{
return __eq__FStar_Order_order(o, FStar_Order_Eq);
}
FStar_Order_order FStar_Order_lex(FStar_Order_order o1, FStar_Order_order (*o2)())
{
switch (o1)
{
case FStar_Order_Lt:
{
return FStar_Order_Lt;
}
case FStar_Order_Eq:
{
return o2();
}
case FStar_Order_Gt:
{
return FStar_Order_Gt;
}
default:
{
KRML_HOST_PRINTF("KreMLin incomplete match at %s:%d\n", __FILE__, __LINE__);
KRML_HOST_EXIT(253U);
}
}
}
FStar_Order_order FStar_Order_order_from_int(Prims_int i)
{
if (Prims_op_LessThan(i, (krml_checked_int_t)0))
{
return FStar_Order_Lt;
}
else
{
if (i == (krml_checked_int_t)0)
{
return FStar_Order_Eq;
}
else
{
return FStar_Order_Gt;
}
}
}
Prims_int FStar_Order_int_of_order(FStar_Order_order uu___7_130)
{
switch (uu___7_130)
{
case FStar_Order_Lt:
{
return (krml_checked_int_t)-1;
}
case FStar_Order_Eq:
{
return (krml_checked_int_t)0;
}
case FStar_Order_Gt:
{
return (krml_checked_int_t)1;
}
default:
{
KRML_HOST_PRINTF("KreMLin incomplete match at %s:%d\n", __FILE__, __LINE__);
KRML_HOST_EXIT(253U);
}
}
}
FStar_Order_order FStar_Order_compare_int(Prims_int i, Prims_int j)
{
return FStar_Order_order_from_int(Prims_op_Subtraction(i, j));
}

49
3rdparty/evercrypt/kremlin/kremlib/FStar_Order.h поставляемый Normal file
Просмотреть файл

@ -0,0 +1,49 @@
/* This file was generated by KreMLin <https://github.com/FStarLang/kremlin>
* KreMLin invocation: ../krml -fparentheses -fcurly-braces -fno-shadow -minimal -tmpdir dist/generic -warn-error +9+11 -skip-compilation -extract-uints -add-include <inttypes.h> -add-include "kremlib.h" -add-include "kremlin/internal/compat.h" -bundle FStar.UInt64+FStar.UInt32+FStar.UInt16+FStar.UInt8=[rename=FStar_UInt_8_16_32_64] -bundle C.Endianness= -bundle FStar.Reflection,FStar.Reflection.*,FStar.Tactics,FStar.Tactics.*,FStar.Range -library C,C.Endianness,C.Failure,C.Loops,FStar.BitVector,FStar.Bytes,FStar.Char,FStar.Int,FStar.Kremlin.Endianness,FStar.Math.Lib,FStar.ModifiesGen,FStar.Monotonic.Heap,FStar.Monotonic.HyperStack,FStar.Mul,FStar.Pervasives,FStar.Pervasives.Native,FStar.ST,FStar.UInt,FStar.UInt128,FStar.UInt63 c_string.c fstar_int32.c fstar_date.c fstar_int64.c c.c fstar_uint32.c fstar_uint64.c prims.c fstar_uint16.c fstar_int16.c fstar_io.c fstar_string.c fstar_dyn.c fstar_int8.c fstar_hyperstack_io.c fstar_uint8.c fstar_bytes.c testlib.c fstar_char.c fstar_uint128.c -o libkremlib.a .extract/prims.krml .extract/FStar_Pervasives_Native.krml .extract/FStar_Pervasives.krml .extract/FStar_Reflection_Types.krml .extract/FStar_Reflection_Data.krml .extract/FStar_Order.krml .extract/FStar_Reflection_Basic.krml .extract/FStar_Mul.krml .extract/FStar_Squash.krml .extract/FStar_Classical.krml .extract/FStar_StrongExcludedMiddle.krml .extract/FStar_FunctionalExtensionality.krml .extract/FStar_List_Tot_Base.krml .extract/FStar_List_Tot_Properties.krml .extract/FStar_List_Tot.krml .extract/FStar_Seq_Base.krml .extract/FStar_Seq_Properties.krml .extract/FStar_Seq.krml .extract/FStar_Math_Lib.krml .extract/FStar_Math_Lemmas.krml .extract/FStar_BitVector.krml .extract/FStar_UInt.krml .extract/FStar_UInt32.krml .extract/FStar_Int.krml .extract/FStar_Int16.krml .extract/FStar_Preorder.krml .extract/FStar_Ghost.krml .extract/FStar_ErasedLogic.krml .extract/FStar_UInt64.krml .extract/FStar_Set.krml .extract/FStar_PropositionalExtensionality.krml .extract/FStar_PredicateExtensionality.krml .extract/FStar_TSet.krml .extract/FStar_Monotonic_Heap.krml .extract/FStar_Heap.krml .extract/FStar_Map.krml .extract/FStar_Monotonic_HyperHeap.krml .extract/FStar_Monotonic_HyperStack.krml .extract/FStar_HyperStack.krml .extract/FStar_Monotonic_Witnessed.krml .extract/FStar_HyperStack_ST.krml .extract/FStar_HyperStack_All.krml .extract/FStar_Char.krml .extract/FStar_Exn.krml .extract/FStar_ST.krml .extract/FStar_All.krml .extract/FStar_List.krml .extract/FStar_String.krml .extract/FStar_Reflection_Const.krml .extract/FStar_Reflection_Derived.krml .extract/FStar_Reflection_Derived_Lemmas.krml .extract/FStar_Date.krml .extract/FStar_Universe.krml .extract/FStar_GSet.krml .extract/FStar_ModifiesGen.krml .extract/FStar_Range.krml .extract/FStar_Tactics_Types.krml .extract/FStar_Tactics_Result.krml .extract/FStar_Tactics_Effect.krml .extract/FStar_Tactics_Util.krml .extract/FStar_Tactics_Builtins.krml .extract/FStar_Reflection_Formula.krml .extract/FStar_Reflection.krml .extract/FStar_Tactics_Derived.krml .extract/FStar_Tactics_Logic.krml .extract/FStar_Tactics.krml .extract/FStar_BigOps.krml .extract/LowStar_Monotonic_Buffer.krml .extract/LowStar_Buffer.krml .extract/Spec_Loops.krml .extract/LowStar_BufferOps.krml .extract/C_Loops.krml .extract/FStar_UInt8.krml .extract/FStar_Kremlin_Endianness.krml .extract/FStar_UInt63.krml .extract/FStar_Dyn.krml .extract/FStar_Int63.krml .extract/FStar_Int64.krml .extract/FStar_Int32.krml .extract/FStar_Int8.krml .extract/FStar_UInt16.krml .extract/FStar_Int_Cast.krml .extract/FStar_UInt128.krml .extract/C_Endianness.krml .extract/FStar_Float.krml .extract/FStar_IO.krml .extract/C.krml .extract/LowStar_Modifies.krml .extract/C_String.krml .extract/FStar_Bytes.krml .extract/FStar_HyperStack_IO.krml .extract/C_Failure.krml .extract/TestLib.krml .extract/FStar_Int_Cast_Full.krml
* F* version: ebf0a2cc
* KreMLin version: e9a42a80
*/
#ifndef __FStar_Order_H
#define __FStar_Order_H
#include "Prims.h"
#include <inttypes.h>
#include "kremlib.h"
#include "kremlin/internal/compat.h"
#define FStar_Order_Lt 0
#define FStar_Order_Eq 1
#define FStar_Order_Gt 2
typedef uint8_t FStar_Order_order;
bool FStar_Order_uu___is_Lt(FStar_Order_order projectee);
bool FStar_Order_uu___is_Eq(FStar_Order_order projectee);
bool FStar_Order_uu___is_Gt(FStar_Order_order projectee);
bool FStar_Order_ge(FStar_Order_order o);
bool FStar_Order_le(FStar_Order_order o);
bool FStar_Order_ne(FStar_Order_order o);
bool FStar_Order_gt(FStar_Order_order o);
bool FStar_Order_lt(FStar_Order_order o);
bool FStar_Order_eq(FStar_Order_order o);
FStar_Order_order FStar_Order_lex(FStar_Order_order o1, FStar_Order_order (*o2)());
FStar_Order_order FStar_Order_order_from_int(Prims_int i);
Prims_int FStar_Order_int_of_order(FStar_Order_order uu___7_130);
FStar_Order_order FStar_Order_compare_int(Prims_int i, Prims_int j);
#define __FStar_Order_H_DEFINED
#endif

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше