argon2 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +7 -4
  3. data/Changelog.md +3 -0
  4. data/README.md +2 -0
  5. data/argon2.gemspec +1 -1
  6. data/ext/argon2_wrap/Makefile +6 -0
  7. data/ext/argon2_wrap/argon_wrap.c +1 -7
  8. data/ext/phc-winner-argon2/.gitignore +1 -0
  9. data/ext/phc-winner-argon2/Argon2.sln +64 -2
  10. data/ext/phc-winner-argon2/CHANGELOG.md +8 -1
  11. data/ext/phc-winner-argon2/LICENSE +301 -18
  12. data/ext/phc-winner-argon2/Makefile +85 -20
  13. data/ext/phc-winner-argon2/README.md +73 -30
  14. data/ext/phc-winner-argon2/argon2-specs.pdf +0 -0
  15. data/ext/phc-winner-argon2/include/argon2.h +73 -10
  16. data/ext/phc-winner-argon2/kats/argon2id +12304 -0
  17. data/ext/phc-winner-argon2/kats/argon2id.shasum +1 -0
  18. data/ext/phc-winner-argon2/kats/argon2id_v16 +12304 -0
  19. data/ext/phc-winner-argon2/kats/argon2id_v16.shasum +1 -0
  20. data/ext/phc-winner-argon2/kats/test.ps1 +1 -1
  21. data/ext/phc-winner-argon2/kats/test.sh +1 -1
  22. data/ext/phc-winner-argon2/latex/IEEEtran.cls +6347 -0
  23. data/ext/phc-winner-argon2/latex/argon2-spec.tex +920 -0
  24. data/ext/phc-winner-argon2/latex/pics/argon2-par.pdf +0 -0
  25. data/ext/phc-winner-argon2/latex/pics/compression.pdf +0 -0
  26. data/ext/phc-winner-argon2/latex/pics/generic.pdf +0 -0
  27. data/ext/phc-winner-argon2/latex/pics/power-distribution.jpg +0 -0
  28. data/ext/phc-winner-argon2/latex/tradeoff.bib +822 -0
  29. data/ext/phc-winner-argon2/libargon2.pc +16 -0
  30. data/ext/phc-winner-argon2/man/argon2.1 +13 -3
  31. data/ext/phc-winner-argon2/src/argon2.c +112 -68
  32. data/ext/phc-winner-argon2/src/bench.c +44 -27
  33. data/ext/phc-winner-argon2/src/blake2/blake2-impl.h +18 -5
  34. data/ext/phc-winner-argon2/src/blake2/blake2.h +17 -0
  35. data/ext/phc-winner-argon2/src/blake2/blake2b.c +25 -7
  36. data/ext/phc-winner-argon2/src/blake2/blamka-round-opt.h +17 -0
  37. data/ext/phc-winner-argon2/src/blake2/blamka-round-ref.h +17 -0
  38. data/ext/phc-winner-argon2/src/core.c +138 -110
  39. data/ext/phc-winner-argon2/src/core.h +41 -26
  40. data/ext/phc-winner-argon2/src/encoding.c +79 -55
  41. data/ext/phc-winner-argon2/src/encoding.h +25 -8
  42. data/ext/phc-winner-argon2/src/genkat.c +35 -39
  43. data/ext/phc-winner-argon2/src/genkat.h +11 -7
  44. data/ext/phc-winner-argon2/src/opt.c +65 -99
  45. data/ext/phc-winner-argon2/src/opt.h +15 -32
  46. data/ext/phc-winner-argon2/src/ref.c +50 -93
  47. data/ext/phc-winner-argon2/src/ref.h +15 -31
  48. data/ext/phc-winner-argon2/src/run.c +73 -30
  49. data/ext/phc-winner-argon2/src/test.c +33 -2
  50. data/ext/phc-winner-argon2/src/thread.c +21 -0
  51. data/ext/phc-winner-argon2/src/thread.h +21 -0
  52. data/ext/phc-winner-argon2/vs2015/Argon2Opt/Argon2Opt.vcxproj +69 -1
  53. data/ext/phc-winner-argon2/vs2015/Argon2OptBench/Argon2OptBench.vcxproj +69 -1
  54. data/ext/phc-winner-argon2/vs2015/Argon2OptDll/Argon2OptDll.vcxproj +225 -0
  55. data/ext/phc-winner-argon2/vs2015/Argon2OptDll/Argon2OptDll.vcxproj.filters +66 -0
  56. data/ext/phc-winner-argon2/vs2015/Argon2OptGenKAT/Argon2OptGenKAT.vcxproj +73 -1
  57. data/ext/phc-winner-argon2/vs2015/Argon2OptTestCI/Argon2OptTestCI.vcxproj +69 -1
  58. data/ext/phc-winner-argon2/vs2015/Argon2Ref/Argon2Ref.vcxproj +69 -1
  59. data/ext/phc-winner-argon2/vs2015/Argon2RefBench/Argon2RefBench.vcxproj +69 -1
  60. data/ext/phc-winner-argon2/vs2015/Argon2RefDll/Argon2RefDll.vcxproj +225 -0
  61. data/ext/phc-winner-argon2/vs2015/Argon2RefDll/Argon2RefDll.vcxproj.filters +66 -0
  62. data/ext/phc-winner-argon2/vs2015/Argon2RefGenKAT/Argon2RefGenKAT.vcxproj +69 -1
  63. data/ext/phc-winner-argon2/vs2015/Argon2RefTestCI/Argon2RefTestCI.vcxproj +69 -1
  64. data/lib/argon2.rb +3 -3
  65. data/lib/argon2/ffi_engine.rb +3 -3
  66. data/lib/argon2/version.rb +1 -1
  67. metadata +21 -5
@@ -0,0 +1,66 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <ItemGroup>
4
+ <Filter Include="Source Files">
5
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7
+ </Filter>
8
+ <Filter Include="Header Files">
9
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
11
+ </Filter>
12
+ <Filter Include="Resource Files">
13
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15
+ </Filter>
16
+ </ItemGroup>
17
+ <ItemGroup>
18
+ <ClInclude Include="..\..\include\argon2.h">
19
+ <Filter>Header Files</Filter>
20
+ </ClInclude>
21
+ <ClInclude Include="..\..\src\blake2\blake2-impl.h">
22
+ <Filter>Header Files</Filter>
23
+ </ClInclude>
24
+ <ClInclude Include="..\..\src\blake2\blake2.h">
25
+ <Filter>Header Files</Filter>
26
+ </ClInclude>
27
+ <ClInclude Include="..\..\src\blake2\blamka-round-opt.h">
28
+ <Filter>Header Files</Filter>
29
+ </ClInclude>
30
+ <ClInclude Include="..\..\src\blake2\blamka-round-ref.h">
31
+ <Filter>Header Files</Filter>
32
+ </ClInclude>
33
+ <ClInclude Include="..\..\src\core.h">
34
+ <Filter>Header Files</Filter>
35
+ </ClInclude>
36
+ <ClInclude Include="..\..\src\encoding.h">
37
+ <Filter>Header Files</Filter>
38
+ </ClInclude>
39
+ <ClInclude Include="..\..\src\ref.h">
40
+ <Filter>Header Files</Filter>
41
+ </ClInclude>
42
+ <ClInclude Include="..\..\src\thread.h">
43
+ <Filter>Header Files</Filter>
44
+ </ClInclude>
45
+ </ItemGroup>
46
+ <ItemGroup>
47
+ <ClCompile Include="..\..\src\argon2.c">
48
+ <Filter>Source Files</Filter>
49
+ </ClCompile>
50
+ <ClCompile Include="..\..\src\blake2\blake2b.c">
51
+ <Filter>Source Files</Filter>
52
+ </ClCompile>
53
+ <ClCompile Include="..\..\src\core.c">
54
+ <Filter>Source Files</Filter>
55
+ </ClCompile>
56
+ <ClCompile Include="..\..\src\encoding.c">
57
+ <Filter>Source Files</Filter>
58
+ </ClCompile>
59
+ <ClInclude Include="..\..\src\ref.c">
60
+ <Filter>Source Files</Filter>
61
+ </ClInclude>
62
+ <ClCompile Include="..\..\src\thread.c">
63
+ <Filter>Source Files</Filter>
64
+ </ClCompile>
65
+ </ItemGroup>
66
+ </Project>
@@ -5,6 +5,14 @@
5
5
  <Configuration>Debug</Configuration>
6
6
  <Platform>Win32</Platform>
7
7
  </ProjectConfiguration>
8
+ <ProjectConfiguration Include="ReleaseStatic|Win32">
9
+ <Configuration>ReleaseStatic</Configuration>
10
+ <Platform>Win32</Platform>
11
+ </ProjectConfiguration>
12
+ <ProjectConfiguration Include="ReleaseStatic|x64">
13
+ <Configuration>ReleaseStatic</Configuration>
14
+ <Platform>x64</Platform>
15
+ </ProjectConfiguration>
8
16
  <ProjectConfiguration Include="Release|Win32">
9
17
  <Configuration>Release</Configuration>
10
18
  <Platform>Win32</Platform>
@@ -37,6 +45,13 @@
37
45
  <WholeProgramOptimization>true</WholeProgramOptimization>
38
46
  <CharacterSet>MultiByte</CharacterSet>
39
47
  </PropertyGroup>
48
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'" Label="Configuration">
49
+ <ConfigurationType>Application</ConfigurationType>
50
+ <UseDebugLibraries>false</UseDebugLibraries>
51
+ <PlatformToolset>v140</PlatformToolset>
52
+ <WholeProgramOptimization>true</WholeProgramOptimization>
53
+ <CharacterSet>MultiByte</CharacterSet>
54
+ </PropertyGroup>
40
55
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
41
56
  <ConfigurationType>Application</ConfigurationType>
42
57
  <UseDebugLibraries>true</UseDebugLibraries>
@@ -50,6 +65,13 @@
50
65
  <WholeProgramOptimization>true</WholeProgramOptimization>
51
66
  <CharacterSet>MultiByte</CharacterSet>
52
67
  </PropertyGroup>
68
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="Configuration">
69
+ <ConfigurationType>Application</ConfigurationType>
70
+ <UseDebugLibraries>false</UseDebugLibraries>
71
+ <PlatformToolset>v140</PlatformToolset>
72
+ <WholeProgramOptimization>true</WholeProgramOptimization>
73
+ <CharacterSet>MultiByte</CharacterSet>
74
+ </PropertyGroup>
53
75
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
54
76
  <ImportGroup Label="ExtensionSettings">
55
77
  </ImportGroup>
@@ -61,12 +83,18 @@
61
83
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
62
84
  <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
63
85
  </ImportGroup>
86
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'" Label="PropertySheets">
87
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
88
+ </ImportGroup>
64
89
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
65
90
  <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
66
91
  </ImportGroup>
67
92
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
68
93
  <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
69
94
  </ImportGroup>
95
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="PropertySheets">
96
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
97
+ </ImportGroup>
70
98
  <PropertyGroup Label="UserMacros" />
71
99
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
72
100
  <OutDir>$(SolutionDir)vs2015\build\</OutDir>
@@ -78,6 +106,11 @@
78
106
  <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
79
107
  <IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
80
108
  </PropertyGroup>
109
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">
110
+ <OutDir>$(SolutionDir)vs2015\build\</OutDir>
111
+ <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
112
+ <IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
113
+ </PropertyGroup>
81
114
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
82
115
  <OutDir>$(SolutionDir)vs2015\build\</OutDir>
83
116
  <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
@@ -88,6 +121,11 @@
88
121
  <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
89
122
  <IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
90
123
  </PropertyGroup>
124
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">
125
+ <OutDir>$(SolutionDir)vs2015\build\</OutDir>
126
+ <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
127
+ <IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
128
+ </PropertyGroup>
91
129
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
92
130
  <ClCompile>
93
131
  <WarningLevel>Level3</WarningLevel>
@@ -118,6 +156,21 @@
118
156
  <OptimizeReferences>true</OptimizeReferences>
119
157
  </Link>
120
158
  </ItemDefinitionGroup>
159
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">
160
+ <ClCompile>
161
+ <WarningLevel>Level3</WarningLevel>
162
+ <Optimization>MaxSpeed</Optimization>
163
+ <FunctionLevelLinking>true</FunctionLevelLinking>
164
+ <IntrinsicFunctions>true</IntrinsicFunctions>
165
+ <SDLCheck>true</SDLCheck>
166
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;GENKAT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
167
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
168
+ </ClCompile>
169
+ <Link>
170
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
171
+ <OptimizeReferences>true</OptimizeReferences>
172
+ </Link>
173
+ </ItemDefinitionGroup>
121
174
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
122
175
  <ClCompile>
123
176
  <WarningLevel>Level3</WarningLevel>
@@ -132,6 +185,21 @@
132
185
  <OptimizeReferences>true</OptimizeReferences>
133
186
  </Link>
134
187
  </ItemDefinitionGroup>
188
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">
189
+ <ClCompile>
190
+ <WarningLevel>Level3</WarningLevel>
191
+ <Optimization>MaxSpeed</Optimization>
192
+ <FunctionLevelLinking>true</FunctionLevelLinking>
193
+ <IntrinsicFunctions>true</IntrinsicFunctions>
194
+ <SDLCheck>true</SDLCheck>
195
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;GENKAT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
196
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
197
+ </ClCompile>
198
+ <Link>
199
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
200
+ <OptimizeReferences>true</OptimizeReferences>
201
+ </Link>
202
+ </ItemDefinitionGroup>
135
203
  <ItemGroup>
136
204
  <ClInclude Include="..\..\include\argon2.h" />
137
205
  <ClInclude Include="..\..\src\blake2\blake2-impl.h" />
@@ -156,4 +224,4 @@
156
224
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
157
225
  <ImportGroup Label="ExtensionTargets">
158
226
  </ImportGroup>
159
- </Project>
227
+ </Project>
@@ -5,6 +5,14 @@
5
5
  <Configuration>Debug</Configuration>
6
6
  <Platform>Win32</Platform>
7
7
  </ProjectConfiguration>
8
+ <ProjectConfiguration Include="ReleaseStatic|Win32">
9
+ <Configuration>ReleaseStatic</Configuration>
10
+ <Platform>Win32</Platform>
11
+ </ProjectConfiguration>
12
+ <ProjectConfiguration Include="ReleaseStatic|x64">
13
+ <Configuration>ReleaseStatic</Configuration>
14
+ <Platform>x64</Platform>
15
+ </ProjectConfiguration>
8
16
  <ProjectConfiguration Include="Release|Win32">
9
17
  <Configuration>Release</Configuration>
10
18
  <Platform>Win32</Platform>
@@ -37,6 +45,13 @@
37
45
  <WholeProgramOptimization>true</WholeProgramOptimization>
38
46
  <CharacterSet>MultiByte</CharacterSet>
39
47
  </PropertyGroup>
48
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'" Label="Configuration">
49
+ <ConfigurationType>Application</ConfigurationType>
50
+ <UseDebugLibraries>false</UseDebugLibraries>
51
+ <PlatformToolset>v140</PlatformToolset>
52
+ <WholeProgramOptimization>true</WholeProgramOptimization>
53
+ <CharacterSet>MultiByte</CharacterSet>
54
+ </PropertyGroup>
40
55
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
41
56
  <ConfigurationType>Application</ConfigurationType>
42
57
  <UseDebugLibraries>true</UseDebugLibraries>
@@ -50,6 +65,13 @@
50
65
  <WholeProgramOptimization>true</WholeProgramOptimization>
51
66
  <CharacterSet>MultiByte</CharacterSet>
52
67
  </PropertyGroup>
68
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="Configuration">
69
+ <ConfigurationType>Application</ConfigurationType>
70
+ <UseDebugLibraries>false</UseDebugLibraries>
71
+ <PlatformToolset>v140</PlatformToolset>
72
+ <WholeProgramOptimization>true</WholeProgramOptimization>
73
+ <CharacterSet>MultiByte</CharacterSet>
74
+ </PropertyGroup>
53
75
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
54
76
  <ImportGroup Label="ExtensionSettings">
55
77
  </ImportGroup>
@@ -61,12 +83,18 @@
61
83
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
62
84
  <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
63
85
  </ImportGroup>
86
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'" Label="PropertySheets">
87
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
88
+ </ImportGroup>
64
89
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
65
90
  <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
66
91
  </ImportGroup>
67
92
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
68
93
  <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
69
94
  </ImportGroup>
95
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="PropertySheets">
96
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
97
+ </ImportGroup>
70
98
  <PropertyGroup Label="UserMacros" />
71
99
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
72
100
  <IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
@@ -78,6 +106,11 @@
78
106
  <OutDir>$(SolutionDir)vs2015\build\</OutDir>
79
107
  <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
80
108
  </PropertyGroup>
109
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">
110
+ <IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
111
+ <OutDir>$(SolutionDir)vs2015\build\</OutDir>
112
+ <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
113
+ </PropertyGroup>
81
114
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
82
115
  <IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
83
116
  <OutDir>$(SolutionDir)vs2015\build\</OutDir>
@@ -88,6 +121,11 @@
88
121
  <OutDir>$(SolutionDir)vs2015\build\</OutDir>
89
122
  <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
90
123
  </PropertyGroup>
124
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">
125
+ <IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath>
126
+ <OutDir>$(SolutionDir)vs2015\build\</OutDir>
127
+ <IntDir>$(SolutionDir)vs2015\build\$(ProjectName)\</IntDir>
128
+ </PropertyGroup>
91
129
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
92
130
  <ClCompile>
93
131
  <WarningLevel>Level3</WarningLevel>
@@ -118,6 +156,21 @@
118
156
  <OptimizeReferences>true</OptimizeReferences>
119
157
  </Link>
120
158
  </ItemDefinitionGroup>
159
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">
160
+ <ClCompile>
161
+ <WarningLevel>Level3</WarningLevel>
162
+ <Optimization>MaxSpeed</Optimization>
163
+ <FunctionLevelLinking>true</FunctionLevelLinking>
164
+ <IntrinsicFunctions>true</IntrinsicFunctions>
165
+ <SDLCheck>true</SDLCheck>
166
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
167
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
168
+ </ClCompile>
169
+ <Link>
170
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
171
+ <OptimizeReferences>true</OptimizeReferences>
172
+ </Link>
173
+ </ItemDefinitionGroup>
121
174
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
122
175
  <ClCompile>
123
176
  <WarningLevel>Level3</WarningLevel>
@@ -132,6 +185,21 @@
132
185
  <OptimizeReferences>true</OptimizeReferences>
133
186
  </Link>
134
187
  </ItemDefinitionGroup>
188
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">
189
+ <ClCompile>
190
+ <WarningLevel>Level3</WarningLevel>
191
+ <Optimization>MaxSpeed</Optimization>
192
+ <FunctionLevelLinking>true</FunctionLevelLinking>
193
+ <IntrinsicFunctions>true</IntrinsicFunctions>
194
+ <SDLCheck>true</SDLCheck>
195
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
196
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
197
+ </ClCompile>
198
+ <Link>
199
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
200
+ <OptimizeReferences>true</OptimizeReferences>
201
+ </Link>
202
+ </ItemDefinitionGroup>
135
203
  <ItemGroup>
136
204
  <ClCompile Include="..\..\src\argon2.c" />
137
205
  <ClCompile Include="..\..\src\blake2\blake2b.c" />
@@ -155,4 +223,4 @@
155
223
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
156
224
  <ImportGroup Label="ExtensionTargets">
157
225
  </ImportGroup>
158
- </Project>
226
+ </Project>
@@ -18,6 +18,9 @@ module Argon2
18
18
  end
19
19
 
20
20
  def create(pass)
21
+ raise ArgonHashFail, "Invalid password (expected string)" unless
22
+ pass.is_a?(String)
23
+
21
24
  Argon2::Engine.hash_argon2i_encode(
22
25
  pass, @salt, @t_cost, @m_cost, @secret)
23
26
  end
@@ -32,9 +35,6 @@ module Argon2
32
35
  raise ArgonHashFail, "Invalid hash" unless
33
36
  /^\$argon2i\$.{,112}/ =~ hash
34
37
 
35
- hash.gsub! "argon2$", "argon2$v=19$" unless
36
- /^\$argon2i\$v=/ =~ hash
37
-
38
38
  Argon2::Engine.argon2i_verify(pass, hash, secret)
39
39
  end
40
40
  end
@@ -39,7 +39,7 @@ module Argon2
39
39
  ret = Ext.argon2i_hash_raw(t_cost, 1 << m_cost, 1, password,
40
40
  password.length, salt, salt.length,
41
41
  buffer, Constants::OUT_LEN)
42
- raise ArgonHashFail, ERRORS[ret.abs] unless ret == 0
42
+ raise ArgonHashFail, ERRORS[ret.abs] unless ret.zero?
43
43
  result = buffer.read_string(Constants::OUT_LEN)
44
44
  end
45
45
  result.unpack('H*').join
@@ -56,7 +56,7 @@ module Argon2
56
56
  ret = Ext.argon2_wrap(buffer, password, passwordlen,
57
57
  salt, salt.length, t_cost, (1 << m_cost),
58
58
  1, secret, secretlen)
59
- raise ArgonHashFail, ERRORS[ret.abs] unless ret == 0
59
+ raise ArgonHashFail, ERRORS[ret.abs] unless ret.zero?
60
60
  result = buffer.read_string(Constants::ENCODE_LEN)
61
61
  end
62
62
  result.delete "\0"
@@ -68,7 +68,7 @@ module Argon2
68
68
 
69
69
  ret = Ext.wrap_argon2_verify(hash, pwd, passwordlen, secret, secretlen)
70
70
  return false if ERRORS[ret.abs] == 'ARGON2_DECODING_FAIL'
71
- raise ArgonHashFail, ERRORS[ret.abs] unless ret == 0
71
+ raise ArgonHashFail, ERRORS[ret.abs] unless ret.zero?
72
72
  true
73
73
  end
74
74
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  # Standard Gem version constant.
3
3
  module Argon2
4
- VERSION = "1.1.1".freeze
4
+ VERSION = "1.1.2".freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: argon2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Technion
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-21 00:00:00.000000000 Z
11
+ date: 2017-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -112,14 +112,14 @@ dependencies:
112
112
  requirements:
113
113
  - - "~>"
114
114
  - !ruby/object:Gem::Version
115
- version: '0.4'
115
+ version: '1.0'
116
116
  type: :development
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - "~>"
121
121
  - !ruby/object:Gem::Version
122
- version: '0.4'
122
+ version: '1.0'
123
123
  description: Argon2 FFI binding
124
124
  email:
125
125
  - technion@lolware.net
@@ -168,10 +168,22 @@ files:
168
168
  - ext/phc-winner-argon2/kats/argon2i.shasum
169
169
  - ext/phc-winner-argon2/kats/argon2i_v16
170
170
  - ext/phc-winner-argon2/kats/argon2i_v16.shasum
171
+ - ext/phc-winner-argon2/kats/argon2id
172
+ - ext/phc-winner-argon2/kats/argon2id.shasum
173
+ - ext/phc-winner-argon2/kats/argon2id_v16
174
+ - ext/phc-winner-argon2/kats/argon2id_v16.shasum
171
175
  - ext/phc-winner-argon2/kats/check-sums.ps1
172
176
  - ext/phc-winner-argon2/kats/check-sums.sh
173
177
  - ext/phc-winner-argon2/kats/test.ps1
174
178
  - ext/phc-winner-argon2/kats/test.sh
179
+ - ext/phc-winner-argon2/latex/IEEEtran.cls
180
+ - ext/phc-winner-argon2/latex/argon2-spec.tex
181
+ - ext/phc-winner-argon2/latex/pics/argon2-par.pdf
182
+ - ext/phc-winner-argon2/latex/pics/compression.pdf
183
+ - ext/phc-winner-argon2/latex/pics/generic.pdf
184
+ - ext/phc-winner-argon2/latex/pics/power-distribution.jpg
185
+ - ext/phc-winner-argon2/latex/tradeoff.bib
186
+ - ext/phc-winner-argon2/libargon2.pc
175
187
  - ext/phc-winner-argon2/man/argon2.1
176
188
  - ext/phc-winner-argon2/opt.o
177
189
  - ext/phc-winner-argon2/src/argon2.c
@@ -199,6 +211,8 @@ files:
199
211
  - ext/phc-winner-argon2/vs2015/Argon2Opt/Argon2Opt.vcxproj.filters
200
212
  - ext/phc-winner-argon2/vs2015/Argon2OptBench/Argon2OptBench.vcxproj
201
213
  - ext/phc-winner-argon2/vs2015/Argon2OptBench/Argon2OptBench.vcxproj.filters
214
+ - ext/phc-winner-argon2/vs2015/Argon2OptDll/Argon2OptDll.vcxproj
215
+ - ext/phc-winner-argon2/vs2015/Argon2OptDll/Argon2OptDll.vcxproj.filters
202
216
  - ext/phc-winner-argon2/vs2015/Argon2OptGenKAT/Argon2OptGenKAT.vcxproj
203
217
  - ext/phc-winner-argon2/vs2015/Argon2OptGenKAT/Argon2OptGenKAT.vcxproj.filters
204
218
  - ext/phc-winner-argon2/vs2015/Argon2OptTestCI/Argon2OptTestCI.vcxproj
@@ -207,6 +221,8 @@ files:
207
221
  - ext/phc-winner-argon2/vs2015/Argon2Ref/Argon2Ref.vcxproj.filters
208
222
  - ext/phc-winner-argon2/vs2015/Argon2RefBench/Argon2RefBench.vcxproj
209
223
  - ext/phc-winner-argon2/vs2015/Argon2RefBench/Argon2RefBench.vcxproj.filters
224
+ - ext/phc-winner-argon2/vs2015/Argon2RefDll/Argon2RefDll.vcxproj
225
+ - ext/phc-winner-argon2/vs2015/Argon2RefDll/Argon2RefDll.vcxproj.filters
210
226
  - ext/phc-winner-argon2/vs2015/Argon2RefGenKAT/Argon2RefGenKAT.vcxproj
211
227
  - ext/phc-winner-argon2/vs2015/Argon2RefGenKAT/Argon2RefGenKAT.vcxproj.filters
212
228
  - ext/phc-winner-argon2/vs2015/Argon2RefTestCI/Argon2RefTestCI.vcxproj
@@ -237,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
253
  version: '0'
238
254
  requirements: []
239
255
  rubyforge_project:
240
- rubygems_version: 2.5.1
256
+ rubygems_version: 2.6.8
241
257
  signing_key:
242
258
  specification_version: 4
243
259
  summary: Argon2 Password hashing binding