From 1cdffe3701caaf2094d147eef3d11d63b1e01c7e Mon Sep 17 00:00:00 2001 From: "ivan.fedorov" <ivan.fedorov@demlabs.net> Date: Mon, 20 Apr 2020 23:27:06 +0300 Subject: [PATCH] 5com --- CMakeLists.txt.user | 423 ++++++++++++++++++++++++++++++++++++++++ include/dap_enc_bliss.h | 2 +- include/dap_enc_key.h | 9 +- src/dap_enc_bliss.c | 2 +- src/dap_enc_key.c | 23 ++- 5 files changed, 452 insertions(+), 7 deletions(-) create mode 100644 CMakeLists.txt.user diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user new file mode 100644 index 0000000..1c61acc --- /dev/null +++ b/CMakeLists.txt.user @@ -0,0 +1,423 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE QtCreatorProject> +<!-- Written by QtCreator 4.11.2, 2020-04-20T21:09:22. --> +<qtcreator> + <data> + <variable>EnvironmentId</variable> + <value type="QByteArray">{11b3ace2-edb6-4ae7-8e1b-fce9fa91893f}</value> + </data> + <data> + <variable>ProjectExplorer.Project.ActiveTarget</variable> + <value type="int">0</value> + </data> + <data> + <variable>ProjectExplorer.Project.EditorSettings</variable> + <valuemap type="QVariantMap"> + <value type="bool" key="EditorConfiguration.AutoIndent">true</value> + <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> + <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> + <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> + <value type="QString" key="language">Cpp</value> + <valuemap type="QVariantMap" key="value"> + <value type="QByteArray" key="CurrentPreferences">CppGlobal</value> + </valuemap> + </valuemap> + <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> + <value type="QString" key="language">QmlJS</value> + <valuemap type="QVariantMap" key="value"> + <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value> + </valuemap> + </valuemap> + <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> + <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value> + <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> + <value type="int" key="EditorConfiguration.IndentSize">4</value> + <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> + <value type="int" key="EditorConfiguration.MarginColumn">80</value> + <value type="bool" key="EditorConfiguration.MouseHiding">true</value> + <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> + <value type="int" key="EditorConfiguration.PaddingMode">1</value> + <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> + <value type="bool" key="EditorConfiguration.ShowMargin">false</value> + <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> + <value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value> + <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> + <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> + <value type="int" key="EditorConfiguration.TabSize">8</value> + <value type="bool" key="EditorConfiguration.UseGlobal">true</value> + <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> + <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> + <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> + <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> + <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> + </valuemap> + </data> + <data> + <variable>ProjectExplorer.Project.PluginSettings</variable> + <valuemap type="QVariantMap"> + <valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey"> + <value type="QString">-fno-delayed-template-parsing</value> + </valuelist> + <value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value> + </valuemap> + </data> + <data> + <variable>ProjectExplorer.Project.Target.0</variable> + <valuemap type="QVariantMap"> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.14.2 MinGW 32-bit</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.14.2 MinGW 32-bit</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5142.win32_mingw73_kit</value> + <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> + <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> + <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> + <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> + <valuelist type="QVariantList" key="CMake.Configuration"> + <value type="QString">CMAKE_BUILD_TYPE:STRING=Debug</value> + <value type="QString">CMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}</value> + <value type="QString">CMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}</value> + <value type="QString">CMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}</value> + <value type="QString">QT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}</value> + </valuelist> + <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/qt_proj/build-libdap-crypto_new-Desktop_Qt_5_14_2_MinGW_32_bit-Debug</value> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> + <value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value> + <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> + <value type="QString">all</value> + </valuelist> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> + <value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value> + <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> + <value type="QString">clean</value> + </valuelist> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> + <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> + <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> + <valuelist type="QVariantList" key="CMake.Configuration"> + <value type="QString">CMAKE_BUILD_TYPE:STRING=Release</value> + <value type="QString">CMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}</value> + <value type="QString">CMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}</value> + <value type="QString">CMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}</value> + <value type="QString">QT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}</value> + </valuelist> + <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/qt_proj/build-libdap-crypto_new-Desktop_Qt_5_14_2_MinGW_32_bit-Release</value> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> + <value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value> + <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> + <value type="QString">all</value> + </valuelist> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> + <value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value> + <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> + <value type="QString">clean</value> + </valuelist> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> + <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> + <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2"> + <valuelist type="QVariantList" key="CMake.Configuration"> + <value type="QString">CMAKE_BUILD_TYPE:STRING=RelWithDebInfo</value> + <value type="QString">CMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}</value> + <value type="QString">CMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}</value> + <value type="QString">CMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}</value> + <value type="QString">QT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}</value> + </valuelist> + <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/qt_proj/build-libdap-crypto_new-Desktop_Qt_5_14_2_MinGW_32_bit-RelWithDebInfo</value> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> + <value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value> + <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> + <value type="QString">all</value> + </valuelist> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> + <value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value> + <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> + <value type="QString">clean</value> + </valuelist> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> + <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> + <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release with Debug Information</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3"> + <valuelist type="QVariantList" key="CMake.Configuration"> + <value type="QString">CMAKE_BUILD_TYPE:STRING=MinSizeRel</value> + <value type="QString">CMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}</value> + <value type="QString">CMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}</value> + <value type="QString">CMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}</value> + <value type="QString">QT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}</value> + </valuelist> + <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/qt_proj/build-libdap-crypto_new-Desktop_Qt_5_14_2_MinGW_32_bit-MinSizeRel</value> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> + <value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value> + <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> + <value type="QString">all</value> + </valuelist> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> + <value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value> + <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> + <value type="QString">clean</value> + </valuelist> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> + <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> + <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Minimum Size Release</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value> + </valuemap> + <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">4</value> + <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> + </valuemap> + <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> + <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> + <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> + <value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value> + <valuelist type="QVariantList" key="Analyzer.Perf.Events"> + <value type="QString">cpu-cycles</value> + </valuelist> + <valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/> + <value type="int" key="Analyzer.Perf.Frequency">250</value> + <valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments"> + <value type="QString">-e</value> + <value type="QString">cpu-cycles</value> + <value type="QString">--call-graph</value> + <value type="QString">dwarf,4096</value> + <value type="QString">-F</value> + <value type="QString">250</value> + </valuelist> + <value type="QString" key="Analyzer.Perf.SampleMode">-F</value> + <value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value> + <value type="int" key="Analyzer.Perf.StackSize">4096</value> + <value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value> + <value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value> + <value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value> + <value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value> + <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value> + <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> + <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> + <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> + <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> + <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> + <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> + <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> + <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> + <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> + <value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value> + <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> + <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> + <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> + <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> + <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> + <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> + <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> + <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> + <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> + <value type="int">0</value> + <value type="int">1</value> + <value type="int">2</value> + <value type="int">3</value> + <value type="int">4</value> + <value type="int">5</value> + <value type="int">6</value> + <value type="int">7</value> + <value type="int">8</value> + <value type="int">9</value> + <value type="int">10</value> + <value type="int">11</value> + <value type="int">12</value> + <value type="int">13</value> + <value type="int">14</value> + </valuelist> + <value type="int" key="PE.EnvironmentAspect.Base">2</value> + <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">crypto-test</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.crypto-test</value> + <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">crypto-test</value> + <value type="QString" key="RunConfiguration.Arguments"></value> + <value type="bool" key="RunConfiguration.Arguments.multi">false</value> + <value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value> + <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> + <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> + <value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value> + <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> + <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> + <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> + <value type="QString" key="RunConfiguration.WorkingDirectory"></value> + <value type="QString" key="RunConfiguration.WorkingDirectory.default">C:/qt_proj/build-libdap-crypto_new-Desktop_Qt_5_14_2_MinGW_32_bit-Debug/test/crypto</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1"> + <value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value> + <valuelist type="QVariantList" key="Analyzer.Perf.Events"> + <value type="QString">cpu-cycles</value> + </valuelist> + <valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/> + <value type="int" key="Analyzer.Perf.Frequency">250</value> + <valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments"> + <value type="QString">-e</value> + <value type="QString">cpu-cycles</value> + <value type="QString">--call-graph</value> + <value type="QString">dwarf,4096</value> + <value type="QString">-F</value> + <value type="QString">250</value> + </valuelist> + <value type="QString" key="Analyzer.Perf.SampleMode">-F</value> + <value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value> + <value type="int" key="Analyzer.Perf.StackSize">4096</value> + <value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value> + <value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value> + <value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value> + <value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value> + <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value> + <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> + <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> + <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> + <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> + <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> + <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> + <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> + <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> + <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> + <value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value> + <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> + <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> + <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> + <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> + <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> + <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> + <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> + <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> + <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> + <value type="int">0</value> + <value type="int">1</value> + <value type="int">2</value> + <value type="int">3</value> + <value type="int">4</value> + <value type="int">5</value> + <value type="int">6</value> + <value type="int">7</value> + <value type="int">8</value> + <value type="int">9</value> + <value type="int">10</value> + <value type="int">11</value> + <value type="int">12</value> + <value type="int">13</value> + <value type="int">14</value> + </valuelist> + <value type="int" key="PE.EnvironmentAspect.Base">2</value> + <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">crypto_cert_test</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.crypto_cert_test</value> + <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">crypto_cert_test</value> + <value type="QString" key="RunConfiguration.Arguments"></value> + <value type="bool" key="RunConfiguration.Arguments.multi">false</value> + <value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value> + <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> + <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> + <value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value> + <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> + <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> + <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> + <value type="QString" key="RunConfiguration.WorkingDirectory"></value> + <value type="QString" key="RunConfiguration.WorkingDirectory.default">C:/qt_proj/build-libdap-crypto_new-Desktop_Qt_5_14_2_MinGW_32_bit-Debug/test/cert</value> + </valuemap> + <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value> + </valuemap> + </data> + <data> + <variable>ProjectExplorer.Project.TargetCount</variable> + <value type="int">1</value> + </data> + <data> + <variable>ProjectExplorer.Project.Updater.FileVersion</variable> + <value type="int">22</value> + </data> + <data> + <variable>Version</variable> + <value type="int">22</value> + </data> +</qtcreator> diff --git a/include/dap_enc_bliss.h b/include/dap_enc_bliss.h index 8e716d9..d45c68b 100755 --- a/include/dap_enc_bliss.h +++ b/include/dap_enc_bliss.h @@ -28,7 +28,7 @@ int dap_enc_sig_bliss_key_pub_output(struct dap_enc_key *l_key, void * l_output) uint8_t* dap_enc_sig_bliss_write_signature(bliss_signature_t* a_sign, size_t *a_sign_out); -bliss_signature_t* dap_enc_sig_bliss_read_signature(const byte_t *a_buf, size_t a_buflen); +bliss_signature_t* dap_enc_sig_bliss_read_signature(const uint8_t *a_buf, size_t a_buflen); uint8_t* dap_enc_sig_bliss_write_private_key(const bliss_private_key_t* a_private_key, size_t *a_buflen_out); uint8_t* dap_enc_sig_bliss_write_public_key(const bliss_public_key_t* a_public_key, size_t *a_buflen_out); bliss_private_key_t* dap_enc_sig_bliss_read_private_key(const uint8_t *a_buf, size_t a_buflen); diff --git a/include/dap_enc_key.h b/include/dap_enc_key.h index 6699bb5..3ee2445 100755 --- a/include/dap_enc_key.h +++ b/include/dap_enc_key.h @@ -30,7 +30,9 @@ #include <time.h> #include <stdint.h> #include "dap_common.h" - +//#ifndef byte_t +// typedef uint_8_t byte_t; +//#endif typedef enum dap_enc_data_type{DAP_ENC_DATA_TYPE_RAW, @@ -110,6 +112,7 @@ typedef enum dap_enc_key_type{ DAP_ENC_KEY_TYPE_IAES, // Symmetric AES DAP_ENC_KEY_TYPE_SIG_DILITHIUM, + DAP_ENC_KEY_TYPE_SIG_RINGCT20,//ring signature for confidentional transaction DAP_ENC_KEY_TYPE_NULL = 0 } dap_enc_key_type_t; @@ -229,8 +232,8 @@ uint8_t* dap_enc_key_serealize_sign(dap_enc_key_type_t a_key_type, uint8_t *a_si uint8_t* dap_enc_key_deserealize_sign(dap_enc_key_type_t a_key_type, uint8_t *a_sign, size_t *a_sign_len); uint8_t* dap_enc_key_serealize_priv_key(dap_enc_key_t *a_key, size_t *a_buflen_out); uint8_t* dap_enc_key_serealize_pub_key(dap_enc_key_t *a_key, size_t *a_buflen_out); -int dap_enc_key_deserealize_priv_key(dap_enc_key_t *a_key, const byte_t *a_buf, size_t a_buflen); -int dap_enc_key_deserealize_pub_key(dap_enc_key_t *a_key, const byte_t *a_buf, size_t a_buflen); +int dap_enc_key_deserealize_priv_key(dap_enc_key_t *a_key, const uint8_t *a_buf, size_t a_buflen); +int dap_enc_key_deserealize_pub_key(dap_enc_key_t *a_key, const uint8_t *a_buf, size_t a_buflen); dap_enc_key_serealize_t* dap_enc_key_serealize(dap_enc_key_t * key); dap_enc_key_t* dap_enc_key_deserealize(const void *buf, size_t buf_size); diff --git a/src/dap_enc_bliss.c b/src/dap_enc_bliss.c index 371f699..c29eeaf 100755 --- a/src/dap_enc_bliss.c +++ b/src/dap_enc_bliss.c @@ -181,7 +181,7 @@ uint8_t* dap_enc_sig_bliss_write_signature(bliss_signature_t* a_sign, size_t *a_ } /* Deserialize a signature */ -bliss_signature_t* dap_enc_sig_bliss_read_signature(const byte_t *a_buf, size_t a_buflen) +bliss_signature_t* dap_enc_sig_bliss_read_signature(const uint8_t *a_buf, size_t a_buflen) { if(!a_buf || a_buflen < (sizeof(size_t) + sizeof(bliss_kind_t))) return NULL ; diff --git a/src/dap_enc_key.c b/src/dap_enc_key.c index a4492f9..bfcb482 100755 --- a/src/dap_enc_key.c +++ b/src/dap_enc_key.c @@ -31,6 +31,7 @@ #include "dap_enc_bliss.h" #include "dap_enc_tesla.h" #include "dap_enc_dilithium.h" +#include "dap_enc_ringct20.h" #include "dap_enc_key.h" @@ -201,6 +202,24 @@ struct dap_enc_key_callbacks{ .dec_out_size = NULL, .sign_get = NULL, .sign_verify = NULL + }, + [DAP_ENC_KEY_TYPE_SIG_RINGCT20]={ + .name = "SIG_RINGCT20", + .enc = NULL, + .dec = NULL, + .enc_na = dap_enc_sig_ringct20_get_sign, + .dec_na = dap_enc_sig_ringct20_verify_sign, + .gen_key_public = NULL, + .gen_key_public_size = NULL, + .gen_bob_shared_key = NULL, + .gen_alice_shared_key = NULL, + .new_callback = dap_enc_sig_ringct20_key_new, + .delete_callback = dap_enc_sig_ringct20_key_delete, + .new_generate_callback = dap_enc_sig_ringct20_key_new_generate, + .enc_out_size = NULL, + .dec_out_size = NULL, + .sign_get = NULL, + .sign_verify = NULL } }; @@ -352,7 +371,7 @@ uint8_t* dap_enc_key_serealize_pub_key(dap_enc_key_t *a_key, size_t *a_buflen_ou * @param a_buflen_out * @return 0 Ok, -1 error */ -int dap_enc_key_deserealize_priv_key(dap_enc_key_t *a_key, const byte_t *a_buf, size_t a_buflen) +int dap_enc_key_deserealize_priv_key(dap_enc_key_t *a_key, const uint8_t *a_buf, size_t a_buflen) { if(!a_key || !a_buf) return -1; @@ -414,7 +433,7 @@ int dap_enc_key_deserealize_priv_key(dap_enc_key_t *a_key, const byte_t *a_buf, * @param a_buflen_out * @return 0 Ok, -1 error */ -int dap_enc_key_deserealize_pub_key(dap_enc_key_t *a_key, const byte_t *a_buf, size_t a_buflen) +int dap_enc_key_deserealize_pub_key(dap_enc_key_t *a_key, const uint8_t *a_buf, size_t a_buflen) { if(!a_key || !a_buf) return -1; -- GitLab