update thirdparty, add build script

This commit is contained in:
nillerusr
2020-11-04 04:02:29 +03:00
parent 85a22a3a92
commit 96dfacf659
2707 changed files with 519720 additions and 418397 deletions
+5 -2
View File
@@ -21,7 +21,7 @@ SHELL = /bin/sh
CC = gcc CC = gcc
INCLUDE = -Iinclude -I/home/nillerusr/projects/source-engine/thirdparty/SDL2-src/include -idirafter /home/nillerusr/projects/source-engine/thirdparty/SDL2-src/src/video/khronos INCLUDE = -Iinclude -I/home/nillerusr/projects/source-engine/thirdparty/SDL2-src/include -idirafter /home/nillerusr/projects/source-engine/thirdparty/SDL2-src/src/video/khronos
CFLAGS = -m32 -Wno-narrowing -DUSING_GENERATED_CONFIG_H CFLAGS = -m32 -Wno-narrowing -DUSING_GENERATED_CONFIG_H
EXTRA_CFLAGS = -Iinclude -I/home/nillerusr/projects/source-engine/thirdparty/SDL2-src/include -idirafter /home/nillerusr/projects/source-engine/thirdparty/SDL2-src/src/video/khronos -mmmx -m3dnow -msse -Wall -fno-strict-aliasing -fvisibility=hidden -Wdeclaration-after-statement -Werror=declaration-after-statement -D_REENTRANT -I$(gen) -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -D_REENTRANT -DHAVE_LINUX_VERSION_H EXTRA_CFLAGS = -Iinclude -I/home/nillerusr/projects/source-engine/thirdparty/SDL2-src/include -idirafter /home/nillerusr/projects/source-engine/thirdparty/SDL2-src/src/video/khronos -mmmx -m3dnow -msse -Wall -fno-strict-aliasing -fvisibility=hidden -Wdeclaration-after-statement -Werror=declaration-after-statement -D_REENTRANT -I$(gen) -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/ibus-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/libmount -I/usr/include/blkid -D_REENTRANT -DHAVE_LINUX_VERSION_H
LDFLAGS = -m32 LDFLAGS = -m32
EXTRA_LDFLAGS = -Wl,--no-undefined -lm -ldl -lpthread -lrt EXTRA_LDFLAGS = -Wl,--no-undefined -lm -ldl -lpthread -lrt
LIBTOOL = $(SHELL) $(top_builddir)/libtool LIBTOOL = $(SHELL) $(top_builddir)/libtool
@@ -31,7 +31,7 @@ RANLIB = ranlib
WINDRES = : WINDRES = :
TARGET = libSDL2.la TARGET = libSDL2.la
OBJECTS = $(objects)/SDL.lo $(objects)/SDL_assert.lo $(objects)/SDL_dataqueue.lo $(objects)/SDL_error.lo $(objects)/SDL_hints.lo $(objects)/SDL_log.lo $(objects)/SDL_atomic.lo $(objects)/SDL_spinlock.lo $(objects)/SDL_audio.lo $(objects)/SDL_audiocvt.lo $(objects)/SDL_audiodev.lo $(objects)/SDL_audiotypecvt.lo $(objects)/SDL_mixer.lo $(objects)/SDL_wave.lo $(objects)/SDL_cpuinfo.lo $(objects)/SDL_dynapi.lo $(objects)/SDL_clipboardevents.lo $(objects)/SDL_displayevents.lo $(objects)/SDL_dropevents.lo $(objects)/SDL_events.lo $(objects)/SDL_gesture.lo $(objects)/SDL_keyboard.lo $(objects)/SDL_mouse.lo $(objects)/SDL_quit.lo $(objects)/SDL_touch.lo $(objects)/SDL_windowevents.lo $(objects)/SDL_rwops.lo $(objects)/SDL_haptic.lo $(objects)/SDL_gamecontroller.lo $(objects)/SDL_joystick.lo $(objects)/e_atan2.lo $(objects)/e_exp.lo $(objects)/e_fmod.lo $(objects)/e_log.lo $(objects)/e_log10.lo $(objects)/e_pow.lo $(objects)/e_rem_pio2.lo $(objects)/e_sqrt.lo $(objects)/k_cos.lo $(objects)/k_rem_pio2.lo $(objects)/k_sin.lo $(objects)/k_tan.lo $(objects)/s_atan.lo $(objects)/s_copysign.lo $(objects)/s_cos.lo $(objects)/s_fabs.lo $(objects)/s_floor.lo $(objects)/s_scalbn.lo $(objects)/s_sin.lo $(objects)/s_tan.lo $(objects)/SDL_power.lo $(objects)/SDL_d3dmath.lo $(objects)/SDL_render.lo $(objects)/SDL_yuv_sw.lo $(objects)/SDL_render_d3d.lo $(objects)/SDL_shaders_d3d.lo $(objects)/SDL_render_d3d11.lo $(objects)/SDL_shaders_d3d11.lo $(objects)/SDL_render_gl.lo $(objects)/SDL_shaders_gl.lo $(objects)/SDL_render_gles.lo $(objects)/SDL_render_gles2.lo $(objects)/SDL_shaders_gles2.lo $(objects)/SDL_render_psp.lo $(objects)/SDL_blendfillrect.lo $(objects)/SDL_blendline.lo $(objects)/SDL_blendpoint.lo $(objects)/SDL_drawline.lo $(objects)/SDL_drawpoint.lo $(objects)/SDL_render_sw.lo $(objects)/SDL_rotate.lo $(objects)/SDL_sensor.lo $(objects)/SDL_getenv.lo $(objects)/SDL_iconv.lo $(objects)/SDL_malloc.lo $(objects)/SDL_qsort.lo $(objects)/SDL_stdlib.lo $(objects)/SDL_string.lo $(objects)/SDL_strtokr.lo $(objects)/SDL_thread.lo $(objects)/SDL_timer.lo $(objects)/SDL_RLEaccel.lo $(objects)/SDL_blit.lo $(objects)/SDL_blit_0.lo $(objects)/SDL_blit_1.lo $(objects)/SDL_blit_A.lo $(objects)/SDL_blit_N.lo $(objects)/SDL_blit_auto.lo $(objects)/SDL_blit_copy.lo $(objects)/SDL_blit_slow.lo $(objects)/SDL_bmp.lo $(objects)/SDL_clipboard.lo $(objects)/SDL_egl.lo $(objects)/SDL_fillrect.lo $(objects)/SDL_pixels.lo $(objects)/SDL_rect.lo $(objects)/SDL_shape.lo $(objects)/SDL_stretch.lo $(objects)/SDL_surface.lo $(objects)/SDL_video.lo $(objects)/SDL_vulkan_utils.lo $(objects)/SDL_yuv.lo $(objects)/yuv_rgb.lo $(objects)/SDL_nullevents.lo $(objects)/SDL_nullframebuffer.lo $(objects)/SDL_nullvideo.lo $(objects)/SDL_diskaudio.lo $(objects)/SDL_dummyaudio.lo $(objects)/SDL_sysloadso.lo $(objects)/SDL_dspaudio.lo $(objects)/SDL_alsa_audio.lo $(objects)/SDL_pulseaudio.lo $(objects)/SDL_jackaudio.lo $(objects)/SDL_x11clipboard.lo $(objects)/SDL_x11dyn.lo $(objects)/SDL_x11events.lo $(objects)/SDL_x11framebuffer.lo $(objects)/SDL_x11keyboard.lo $(objects)/SDL_x11messagebox.lo $(objects)/SDL_x11modes.lo $(objects)/SDL_x11mouse.lo $(objects)/SDL_x11opengl.lo $(objects)/SDL_x11opengles.lo $(objects)/SDL_x11shape.lo $(objects)/SDL_x11touch.lo $(objects)/SDL_x11video.lo $(objects)/SDL_x11vulkan.lo $(objects)/SDL_x11window.lo $(objects)/SDL_x11xinput2.lo $(objects)/edid-parse.lo $(objects)/imKStoUCS.lo $(objects)/SDL_waylandclipboard.lo $(objects)/SDL_waylanddatamanager.lo $(objects)/SDL_waylanddyn.lo $(objects)/SDL_waylandevents.lo $(objects)/SDL_waylandmouse.lo $(objects)/SDL_waylandopengles.lo $(objects)/SDL_waylandtouch.lo $(objects)/SDL_waylandvideo.lo $(objects)/SDL_waylandvulkan.lo $(objects)/SDL_waylandwindow.lo $(objects)/SDL_dbus.lo $(objects)/SDL_ime.lo $(objects)/SDL_systhread.lo $(objects)/SDL_syssem.lo $(objects)/SDL_sysmutex.lo $(objects)/SDL_syscond.lo $(objects)/SDL_systls.lo $(objects)/SDL_sysjoystick.lo $(objects)/SDL_steamcontroller.lo $(objects)/SDL_syshaptic.lo $(objects)/SDL_syspower.lo $(objects)/SDL_sysfilesystem.lo $(objects)/SDL_systimer.lo $(objects)/SDL_udev.lo $(objects)/SDL_evdev.lo $(objects)/SDL_evdev_kbd.lo $(objects)/SDL_threadprio.lo $(objects)/SDL_poll.lo $(objects)/SDL_dummysensor.lo OBJECTS = $(objects)/SDL.lo $(objects)/SDL_assert.lo $(objects)/SDL_dataqueue.lo $(objects)/SDL_error.lo $(objects)/SDL_hints.lo $(objects)/SDL_log.lo $(objects)/SDL_atomic.lo $(objects)/SDL_spinlock.lo $(objects)/SDL_audio.lo $(objects)/SDL_audiocvt.lo $(objects)/SDL_audiodev.lo $(objects)/SDL_audiotypecvt.lo $(objects)/SDL_mixer.lo $(objects)/SDL_wave.lo $(objects)/SDL_cpuinfo.lo $(objects)/SDL_dynapi.lo $(objects)/SDL_clipboardevents.lo $(objects)/SDL_displayevents.lo $(objects)/SDL_dropevents.lo $(objects)/SDL_events.lo $(objects)/SDL_gesture.lo $(objects)/SDL_keyboard.lo $(objects)/SDL_mouse.lo $(objects)/SDL_quit.lo $(objects)/SDL_touch.lo $(objects)/SDL_windowevents.lo $(objects)/SDL_rwops.lo $(objects)/SDL_haptic.lo $(objects)/SDL_gamecontroller.lo $(objects)/SDL_joystick.lo $(objects)/e_atan2.lo $(objects)/e_exp.lo $(objects)/e_fmod.lo $(objects)/e_log.lo $(objects)/e_log10.lo $(objects)/e_pow.lo $(objects)/e_rem_pio2.lo $(objects)/e_sqrt.lo $(objects)/k_cos.lo $(objects)/k_rem_pio2.lo $(objects)/k_sin.lo $(objects)/k_tan.lo $(objects)/s_atan.lo $(objects)/s_copysign.lo $(objects)/s_cos.lo $(objects)/s_fabs.lo $(objects)/s_floor.lo $(objects)/s_scalbn.lo $(objects)/s_sin.lo $(objects)/s_tan.lo $(objects)/SDL_power.lo $(objects)/SDL_d3dmath.lo $(objects)/SDL_render.lo $(objects)/SDL_yuv_sw.lo $(objects)/SDL_render_d3d.lo $(objects)/SDL_shaders_d3d.lo $(objects)/SDL_render_d3d11.lo $(objects)/SDL_shaders_d3d11.lo $(objects)/SDL_render_gl.lo $(objects)/SDL_shaders_gl.lo $(objects)/SDL_render_gles.lo $(objects)/SDL_render_gles2.lo $(objects)/SDL_shaders_gles2.lo $(objects)/SDL_render_psp.lo $(objects)/SDL_blendfillrect.lo $(objects)/SDL_blendline.lo $(objects)/SDL_blendpoint.lo $(objects)/SDL_drawline.lo $(objects)/SDL_drawpoint.lo $(objects)/SDL_render_sw.lo $(objects)/SDL_rotate.lo $(objects)/SDL_sensor.lo $(objects)/SDL_getenv.lo $(objects)/SDL_iconv.lo $(objects)/SDL_malloc.lo $(objects)/SDL_qsort.lo $(objects)/SDL_stdlib.lo $(objects)/SDL_string.lo $(objects)/SDL_strtokr.lo $(objects)/SDL_thread.lo $(objects)/SDL_timer.lo $(objects)/SDL_RLEaccel.lo $(objects)/SDL_blit.lo $(objects)/SDL_blit_0.lo $(objects)/SDL_blit_1.lo $(objects)/SDL_blit_A.lo $(objects)/SDL_blit_N.lo $(objects)/SDL_blit_auto.lo $(objects)/SDL_blit_copy.lo $(objects)/SDL_blit_slow.lo $(objects)/SDL_bmp.lo $(objects)/SDL_clipboard.lo $(objects)/SDL_egl.lo $(objects)/SDL_fillrect.lo $(objects)/SDL_pixels.lo $(objects)/SDL_rect.lo $(objects)/SDL_shape.lo $(objects)/SDL_stretch.lo $(objects)/SDL_surface.lo $(objects)/SDL_video.lo $(objects)/SDL_vulkan_utils.lo $(objects)/SDL_yuv.lo $(objects)/yuv_rgb.lo $(objects)/SDL_nullevents.lo $(objects)/SDL_nullframebuffer.lo $(objects)/SDL_nullvideo.lo $(objects)/SDL_diskaudio.lo $(objects)/SDL_dummyaudio.lo $(objects)/SDL_sysloadso.lo $(objects)/SDL_dspaudio.lo $(objects)/SDL_alsa_audio.lo $(objects)/SDL_pulseaudio.lo $(objects)/SDL_jackaudio.lo $(objects)/SDL_x11clipboard.lo $(objects)/SDL_x11dyn.lo $(objects)/SDL_x11events.lo $(objects)/SDL_x11framebuffer.lo $(objects)/SDL_x11keyboard.lo $(objects)/SDL_x11messagebox.lo $(objects)/SDL_x11modes.lo $(objects)/SDL_x11mouse.lo $(objects)/SDL_x11opengl.lo $(objects)/SDL_x11opengles.lo $(objects)/SDL_x11shape.lo $(objects)/SDL_x11touch.lo $(objects)/SDL_x11video.lo $(objects)/SDL_x11vulkan.lo $(objects)/SDL_x11window.lo $(objects)/SDL_x11xinput2.lo $(objects)/edid-parse.lo $(objects)/imKStoUCS.lo $(objects)/SDL_waylandclipboard.lo $(objects)/SDL_waylanddatamanager.lo $(objects)/SDL_waylanddyn.lo $(objects)/SDL_waylandevents.lo $(objects)/SDL_waylandmouse.lo $(objects)/SDL_waylandopengles.lo $(objects)/SDL_waylandtouch.lo $(objects)/SDL_waylandvideo.lo $(objects)/SDL_waylandvulkan.lo $(objects)/SDL_waylandwindow.lo $(objects)/SDL_dbus.lo $(objects)/SDL_ime.lo $(objects)/SDL_ibus.lo $(objects)/SDL_systhread.lo $(objects)/SDL_syssem.lo $(objects)/SDL_sysmutex.lo $(objects)/SDL_syscond.lo $(objects)/SDL_systls.lo $(objects)/SDL_sysjoystick.lo $(objects)/SDL_steamcontroller.lo $(objects)/SDL_syshaptic.lo $(objects)/SDL_syspower.lo $(objects)/SDL_sysfilesystem.lo $(objects)/SDL_systimer.lo $(objects)/SDL_udev.lo $(objects)/SDL_evdev.lo $(objects)/SDL_evdev_kbd.lo $(objects)/SDL_threadprio.lo $(objects)/SDL_poll.lo $(objects)/SDL_dummysensor.lo
GEN_HEADERS = $(gen)/org-kde-kwin-server-decoration-manager-client-protocol.h $(gen)/pointer-constraints-unstable-v1-client-protocol.h $(gen)/relative-pointer-unstable-v1-client-protocol.h $(gen)/wayland-client-protocol.h $(gen)/xdg-decoration-unstable-v1-client-protocol.h $(gen)/xdg-shell-unstable-v6-client-protocol.h $(gen)/xdg-shell-client-protocol.h GEN_HEADERS = $(gen)/org-kde-kwin-server-decoration-manager-client-protocol.h $(gen)/pointer-constraints-unstable-v1-client-protocol.h $(gen)/relative-pointer-unstable-v1-client-protocol.h $(gen)/wayland-client-protocol.h $(gen)/xdg-decoration-unstable-v1-client-protocol.h $(gen)/xdg-shell-unstable-v6-client-protocol.h $(gen)/xdg-shell-client-protocol.h
GEN_OBJECTS = $(objects)/org-kde-kwin-server-decoration-manager-protocol.lo $(objects)/pointer-constraints-unstable-v1-protocol.lo $(objects)/relative-pointer-unstable-v1-protocol.lo $(objects)/wayland-protocol.lo $(objects)/xdg-decoration-unstable-v1-protocol.lo $(objects)/xdg-shell-unstable-v6-protocol.lo $(objects)/xdg-shell-protocol.lo GEN_OBJECTS = $(objects)/org-kde-kwin-server-decoration-manager-protocol.lo $(objects)/pointer-constraints-unstable-v1-protocol.lo $(objects)/relative-pointer-unstable-v1-protocol.lo $(objects)/wayland-protocol.lo $(objects)/xdg-decoration-unstable-v1-protocol.lo $(objects)/xdg-shell-unstable-v6-protocol.lo $(objects)/xdg-shell-protocol.lo
VERSION_OBJECTS = VERSION_OBJECTS =
@@ -685,6 +685,9 @@ $(objects)/SDL_dbus.lo: /home/nillerusr/projects/source-engine/thirdparty/SDL2-s
$(objects)/SDL_ime.lo: /home/nillerusr/projects/source-engine/thirdparty/SDL2-src/src/core/linux/SDL_ime.c $(objects)/.created $(objects)/SDL_ime.lo: /home/nillerusr/projects/source-engine/thirdparty/SDL2-src/src/core/linux/SDL_ime.c $(objects)/.created
$(RUN_CMD_CC)$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MMD -MT $@ -c $< -o $@ $(RUN_CMD_CC)$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MMD -MT $@ -c $< -o $@
$(objects)/SDL_ibus.lo: /home/nillerusr/projects/source-engine/thirdparty/SDL2-src/src/core/linux/SDL_ibus.c $(objects)/.created
$(RUN_CMD_CC)$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MMD -MT $@ -c $< -o $@
$(objects)/SDL_systhread.lo: /home/nillerusr/projects/source-engine/thirdparty/SDL2-src/src/thread/pthread/SDL_systhread.c $(objects)/.created $(objects)/SDL_systhread.lo: /home/nillerusr/projects/source-engine/thirdparty/SDL2-src/src/thread/pthread/SDL_systhread.c $(objects)/.created
$(RUN_CMD_CC)$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MMD -MT $@ -c $< -o $@ $(RUN_CMD_CC)$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MMD -MT $@ -c $< -o $@
+3
View File
@@ -434,6 +434,9 @@ $(objects)/SDL_dbus.lo: /home/nillerusr/projects/source-engine/thirdparty/SDL2-s
$(objects)/SDL_ime.lo: /home/nillerusr/projects/source-engine/thirdparty/SDL2-src/src/core/linux/SDL_ime.c $(objects)/.created $(objects)/SDL_ime.lo: /home/nillerusr/projects/source-engine/thirdparty/SDL2-src/src/core/linux/SDL_ime.c $(objects)/.created
$(RUN_CMD_CC)$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MMD -MT $@ -c $< -o $@ $(RUN_CMD_CC)$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MMD -MT $@ -c $< -o $@
$(objects)/SDL_ibus.lo: /home/nillerusr/projects/source-engine/thirdparty/SDL2-src/src/core/linux/SDL_ibus.c $(objects)/.created
$(RUN_CMD_CC)$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MMD -MT $@ -c $< -o $@
$(objects)/SDL_systhread.lo: /home/nillerusr/projects/source-engine/thirdparty/SDL2-src/src/thread/pthread/SDL_systhread.c $(objects)/.created $(objects)/SDL_systhread.lo: /home/nillerusr/projects/source-engine/thirdparty/SDL2-src/src/thread/pthread/SDL_systhread.c $(objects)/.created
$(RUN_CMD_CC)$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MMD -MT $@ -c $< -o $@ $(RUN_CMD_CC)$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MMD -MT $@ -c $< -o $@
+320 -711
View File
File diff suppressed because it is too large Load Diff
+13 -11
View File
@@ -673,7 +673,7 @@ postuninstall_cmds=''
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
finish_eval='' finish_eval=''
hardcode_into_libs='yes' hardcode_into_libs='yes'
sys_lib_search_path_spec='/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0 /usr/lib32 /lib32 ' sys_lib_search_path_spec='/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4 /usr/lib32 /lib32 '
sys_lib_dlsearch_path_spec='/lib /usr/lib /usr/lib/libfakeroot /usr/lib32 ' sys_lib_dlsearch_path_spec='/lib /usr/lib /usr/lib/libfakeroot /usr/lib32 '
hardcode_action='immediate' hardcode_action='immediate'
enable_dlopen='unknown' enable_dlopen='unknown'
@@ -729,12 +729,12 @@ prelink_cmds_CXX=''
postlink_cmds_CXX='' postlink_cmds_CXX=''
file_list_spec_CXX='' file_list_spec_CXX=''
hardcode_action_CXX='immediate' hardcode_action_CXX='immediate'
compiler_lib_search_dirs_CXX='/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/32 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib32 /lib/../lib32 /usr/lib/../lib32 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../..' compiler_lib_search_dirs_CXX='/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/32 /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../../lib32 /lib/../lib32 /usr/lib/../lib32 /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4 /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../..'
predep_objects_CXX='/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib32/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/32/crtbeginS.o' predep_objects_CXX='/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../../lib32/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/32/crtbeginS.o'
postdep_objects_CXX='/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/32/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib32/crtn.o' postdep_objects_CXX='/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/32/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../../lib32/crtn.o'
predeps_CXX='' predeps_CXX=''
postdeps_CXX='-lstdc++ -lm -lgcc_s -lc -lgcc_s' postdeps_CXX='-lstdc++ -lm -lgcc_s -lc -lgcc_s'
compiler_lib_search_path_CXX='-L/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/32 -L/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib32 -L/lib/../lib32 -L/usr/lib/../lib32 -L/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0 -L/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../..' compiler_lib_search_path_CXX='-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/32 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../../lib32 -L/lib/../lib32 -L/usr/lib/../lib32 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../..'
LTCC='gcc' LTCC='gcc'
LTCFLAGS='-m32 -Wno-narrowing' LTCFLAGS='-m32 -Wno-narrowing'
@@ -793,7 +793,7 @@ fi
SUMMARY="SDL2 Configure Summary:\nBuilding Shared Libraries\nBuilding Static Libraries\nEnabled modules : atomic audio video render events joystick haptic sensor power filesystem threads timers file loadso cpuinfo assembly\nAssembly Math : mmx 3dnow sse\nAudio drivers : disk dummy oss alsa(dynamic) pulse(dynamic) jack(dynamic)\nVideo drivers : dummy x11(dynamic) opengl opengl_es2 vulkan wayland(dynamic)\nX11 libraries : xcursor xdbe xinerama xinput2 xinput2_multitouch xrandr xscrnsaver xshape xvidmode\nInput drivers : linuxev linuxkd\nUsing libsamplerate : YES\nUsing libudev : YES\nUsing dbus : YES\nUsing ime : YES\nUsing ibus : NO\nUsing fcitx : NO\n" SUMMARY="SDL2 Configure Summary:\nBuilding Shared Libraries\nBuilding Static Libraries\nEnabled modules : atomic audio video render events joystick haptic sensor power filesystem threads timers file loadso cpuinfo assembly\nAssembly Math : mmx 3dnow sse\nAudio drivers : disk dummy oss alsa(dynamic) pulse(dynamic) jack(dynamic)\nVideo drivers : dummy x11(dynamic) opengl opengl_es2 vulkan wayland(dynamic)\nX11 libraries : xcursor xdbe xinerama xinput2 xinput2_multitouch xrandr xscrnsaver xshape xvidmode\nInput drivers : linuxev linuxkd\nUsing libsamplerate : YES\nUsing libudev : YES\nUsing dbus : YES\nUsing ime : YES\nUsing ibus : YES\nUsing fcitx : NO\n"
# Handling of arguments. # Handling of arguments.
@@ -881,7 +881,8 @@ S["EXTRA_LDFLAGS"]=" -Wl,--no-undefined -lm -ldl -lpthread -lrt"
S["BUILD_LDFLAGS"]="-m32" S["BUILD_LDFLAGS"]="-m32"
S["EXTRA_CFLAGS"]="-Iinclude -I/home/nillerusr/projects/source-engine/thirdparty/SDL2-src/include -idirafter /home/nillerusr/projects/source-engine/thirdparty/SDL2-src"\ S["EXTRA_CFLAGS"]="-Iinclude -I/home/nillerusr/projects/source-engine/thirdparty/SDL2-src/include -idirafter /home/nillerusr/projects/source-engine/thirdparty/SDL2-src"\
"/src/video/khronos -mmmx -m3dnow -msse -Wall -fno-strict-aliasing -fvisibility=hidden -Wdeclaration-after-statement -Werror=declaration-after-state"\ "/src/video/khronos -mmmx -m3dnow -msse -Wall -fno-strict-aliasing -fvisibility=hidden -Wdeclaration-after-statement -Werror=declaration-after-state"\
"ment -D_REENTRANT -I$(gen) -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -D_REENTRANT -DHAVE_LINUX_VERSION_H" "ment -D_REENTRANT -I$(gen) -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/ibus-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib"\
"-2.0/include -pthread -I/usr/include/libmount -I/usr/include/blkid -D_REENTRANT -DHAVE_LINUX_VERSION_H"
S["BUILD_CFLAGS"]="-m32 -Wno-narrowing -DUSING_GENERATED_CONFIG_H" S["BUILD_CFLAGS"]="-m32 -Wno-narrowing -DUSING_GENERATED_CONFIG_H"
S["SDLTEST_OBJECTS"]="$(objects)/SDL_test_assert.lo $(objects)/SDL_test_common.lo $(objects)/SDL_test_compare.lo $(objects)/SDL_test_crc32.lo $(objects)/SDL_test_font.lo "\ S["SDLTEST_OBJECTS"]="$(objects)/SDL_test_assert.lo $(objects)/SDL_test_common.lo $(objects)/SDL_test_compare.lo $(objects)/SDL_test_crc32.lo $(objects)/SDL_test_font.lo "\
"$(objects)/SDL_test_fuzzer.lo $(objects)/SDL_test_harness.lo $(objects)/SDL_test_imageBlit.lo $(objects)/SDL_test_imageBlitBlend.lo $(objects)/SDL_t"\ "$(objects)/SDL_test_fuzzer.lo $(objects)/SDL_test_harness.lo $(objects)/SDL_test_imageBlit.lo $(objects)/SDL_test_imageBlitBlend.lo $(objects)/SDL_t"\
@@ -920,10 +921,10 @@ S["OBJECTS"]="$(objects)/SDL.lo $(objects)/SDL_assert.lo $(objects)/SDL_dataqueu
"s)/SDL_x11video.lo $(objects)/SDL_x11vulkan.lo $(objects)/SDL_x11window.lo $(objects)/SDL_x11xinput2.lo $(objects)/edid-parse.lo $(objects)/imKStoUC"\ "s)/SDL_x11video.lo $(objects)/SDL_x11vulkan.lo $(objects)/SDL_x11window.lo $(objects)/SDL_x11xinput2.lo $(objects)/edid-parse.lo $(objects)/imKStoUC"\
"S.lo $(objects)/SDL_waylandclipboard.lo $(objects)/SDL_waylanddatamanager.lo $(objects)/SDL_waylanddyn.lo $(objects)/SDL_waylandevents.lo $(objects)"\ "S.lo $(objects)/SDL_waylandclipboard.lo $(objects)/SDL_waylanddatamanager.lo $(objects)/SDL_waylanddyn.lo $(objects)/SDL_waylandevents.lo $(objects)"\
"/SDL_waylandmouse.lo $(objects)/SDL_waylandopengles.lo $(objects)/SDL_waylandtouch.lo $(objects)/SDL_waylandvideo.lo $(objects)/SDL_waylandvulkan.lo"\ "/SDL_waylandmouse.lo $(objects)/SDL_waylandopengles.lo $(objects)/SDL_waylandtouch.lo $(objects)/SDL_waylandvideo.lo $(objects)/SDL_waylandvulkan.lo"\
" $(objects)/SDL_waylandwindow.lo $(objects)/SDL_dbus.lo $(objects)/SDL_ime.lo $(objects)/SDL_systhread.lo $(objects)/SDL_syssem.lo $(objects)/SDL_sy"\ " $(objects)/SDL_waylandwindow.lo $(objects)/SDL_dbus.lo $(objects)/SDL_ime.lo $(objects)/SDL_ibus.lo $(objects)/SDL_systhread.lo $(objects)/SDL_syss"\
"smutex.lo $(objects)/SDL_syscond.lo $(objects)/SDL_systls.lo $(objects)/SDL_sysjoystick.lo $(objects)/SDL_steamcontroller.lo $(objects)/SDL_syshapti"\ "em.lo $(objects)/SDL_sysmutex.lo $(objects)/SDL_syscond.lo $(objects)/SDL_systls.lo $(objects)/SDL_sysjoystick.lo $(objects)/SDL_steamcontroller.lo "\
"c.lo $(objects)/SDL_syspower.lo $(objects)/SDL_sysfilesystem.lo $(objects)/SDL_systimer.lo $(objects)/SDL_udev.lo $(objects)/SDL_evdev.lo $(objects)"\ "$(objects)/SDL_syshaptic.lo $(objects)/SDL_syspower.lo $(objects)/SDL_sysfilesystem.lo $(objects)/SDL_systimer.lo $(objects)/SDL_udev.lo $(objects)/"\
"/SDL_evdev_kbd.lo $(objects)/SDL_threadprio.lo $(objects)/SDL_poll.lo $(objects)/SDL_dummysensor.lo" "SDL_evdev.lo $(objects)/SDL_evdev_kbd.lo $(objects)/SDL_threadprio.lo $(objects)/SDL_poll.lo $(objects)/SDL_dummysensor.lo"
S["INCLUDE"]="-Iinclude -I/home/nillerusr/projects/source-engine/thirdparty/SDL2-src/include -idirafter /home/nillerusr/projects/source-engine/thirdparty/SDL2-src"\ S["INCLUDE"]="-Iinclude -I/home/nillerusr/projects/source-engine/thirdparty/SDL2-src/include -idirafter /home/nillerusr/projects/source-engine/thirdparty/SDL2-src"\
"/src/video/khronos" "/src/video/khronos"
S["ac_aux_dir"]="build-scripts" S["ac_aux_dir"]="build-scripts"
@@ -1300,6 +1301,7 @@ D["HAVE_LIBUDEV_H"]=" 1"
D["SDL_UDEV_DYNAMIC"]=" \"libudev.so.1\"" D["SDL_UDEV_DYNAMIC"]=" \"libudev.so.1\""
D["HAVE_DBUS_DBUS_H"]=" 1" D["HAVE_DBUS_DBUS_H"]=" 1"
D["SDL_USE_IME"]=" 1" D["SDL_USE_IME"]=" 1"
D["HAVE_IBUS_IBUS_H"]=" 1"
D["SDL_INPUT_LINUXKD"]=" 1" D["SDL_INPUT_LINUXKD"]=" 1"
D["SDL_THREAD_PTHREAD"]=" 1" D["SDL_THREAD_PTHREAD"]=" 1"
D["SDL_THREAD_PTHREAD_RECURSIVE_MUTEX"]=" 1" D["SDL_THREAD_PTHREAD_RECURSIVE_MUTEX"]=" 1"
+1 -1
View File
@@ -206,7 +206,7 @@
/* #undef HAVE_ALTIVEC_H */ /* #undef HAVE_ALTIVEC_H */
#define HAVE_DBUS_DBUS_H 1 #define HAVE_DBUS_DBUS_H 1
/* #undef HAVE_FCITX_FRONTEND_H */ /* #undef HAVE_FCITX_FRONTEND_H */
/* #undef HAVE_IBUS_IBUS_H */ #define HAVE_IBUS_IBUS_H 1
#define HAVE_IMMINTRIN_H 1 #define HAVE_IMMINTRIN_H 1
#define HAVE_LIBSAMPLERATE_H 1 #define HAVE_LIBSAMPLERATE_H 1
#define HAVE_LIBUDEV_H 1 #define HAVE_LIBUDEV_H 1
+5 -5
View File
@@ -275,7 +275,7 @@ finish_eval=""
hardcode_into_libs=yes hardcode_into_libs=yes
# Compile-time system search path for libraries. # Compile-time system search path for libraries.
sys_lib_search_path_spec="/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0 /usr/lib32 /lib32 " sys_lib_search_path_spec="/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4 /usr/lib32 /lib32 "
# Run-time system search path for libraries. # Run-time system search path for libraries.
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/libfakeroot /usr/lib32 " sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/libfakeroot /usr/lib32 "
@@ -10227,17 +10227,17 @@ file_list_spec=""
hardcode_action=immediate hardcode_action=immediate
# The directories searched by this compiler when creating a shared library. # The directories searched by this compiler when creating a shared library.
compiler_lib_search_dirs="/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/32 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib32 /lib/../lib32 /usr/lib/../lib32 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../.." compiler_lib_search_dirs="/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/32 /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../../lib32 /lib/../lib32 /usr/lib/../lib32 /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4 /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../.."
# Dependencies to place before and after the objects being linked to # Dependencies to place before and after the objects being linked to
# create a shared library. # create a shared library.
predep_objects="/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib32/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/32/crtbeginS.o" predep_objects="/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../../lib32/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/32/crtbeginS.o"
postdep_objects="/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/32/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib32/crtn.o" postdep_objects="/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/32/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../../lib32/crtn.o"
predeps="" predeps=""
postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s" postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
# The library search path used internally by the compiler when linking # The library search path used internally by the compiler when linking
# a shared library. # a shared library.
compiler_lib_search_path="-L/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/32 -L/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib32 -L/lib/../lib32 -L/usr/lib/../lib32 -L/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0 -L/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../.." compiler_lib_search_path="-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/32 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../../lib32 -L/lib/../lib32 -L/usr/lib/../lib32 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../.."
# ### END LIBTOOL TAG CONFIG: CXX # ### END LIBTOOL TAG CONFIG: CXX
@@ -17,7 +17,7 @@ DLL_SRCDIR=.
DEFINES = -DVPROF_LEVEL=1 -DGNUC -DNO_HOOK_MALLOC -DNO_MALLOC_OVERRIDE -DANDROID DEFINES = -DVPROF_LEVEL=1 -DGNUC -DNO_HOOK_MALLOC -DNO_MALLOC_OVERRIDE -DANDROID
DEFINES += -DVPC -DRAD_TELEMETRY_DISABLED -DNDEBUG -DGNUC -DPOSIX -DCOMPILER_GCC -D_DLL_EXT=.so -D_LINUX -DLINUX -DPOSIX -D_POSIX -DBINK_VIDEO -DGL_GLEXT_PROTOTYPES -DDX_TO_GL_ABSTRACTION -DUSE_SDL -DDEV_BUILD -DFRAME_POINTER_OMISSION_DISABLED -DSOURCE1=1 -D_LINUX=1 -D_POSIX=1 -DLINUX=1 -DPOSIX=1 DEFINES += -DVPC -DRAD_TELEMETRY_DISABLED -DNDEBUG -DGNUC -DPOSIX -DCOMPILER_GCC -D_DLL_EXT=.so -D_LINUX -DLINUX -DPOSIX -D_POSIX -DBINK_VIDEO -DGL_GLEXT_PROTOTYPES -DDX_TO_GL_ABSTRACTION -DUSE_SDL -DDEV_BUILD -DFRAME_POINTER_OMISSION_DISABLED -DSOURCE1=1 -D_LINUX=1 -D_POSIX=1 -DLINUX=1 -DPOSIX=1
SRCS = FakeSteamAPI_Core.cpp SRCS = steam_api.cpp
SRCS_C = SRCS_C =
OBJS = $(patsubst %.cpp,%.o,$(SRCS)) OBJS = $(patsubst %.cpp,%.o,$(SRCS))
Vendored Executable
+102
View File
@@ -0,0 +1,102 @@
#!/bin/sh
INSTALLDIR=../../lib/public/linux32
clean() {
cd $1
echo cleaning $1
make clean &> /dev/null || echo clean failed for $1
[ -f confdone ] && rm confdone
cd ../
}
conf() {
[ -f confdone ] || ( "$@" && touch confdone )
}
mk() {
make "$@" -j$(nproc --all)
}
inst() {
cp $1 ../../lib/public/linux32
}
mkdir -p ../lib/public/linux32
mkdir -p ../lib/common/ubuntu12_32/
mkdir -p ../lib/common/linux32
if [ "$1" = "clean" ]
then
clean gperftools-2.0
clean SDL2-src
clean protobuf-2.6.1
clean StubSteamAPI/
clean openssl
clean cryptopp
clean libjpeg
clean libpng
clean zlib
clean libedit-3.1
exit
fi
cd gperftools-2.0
conf ./configure CFLAGS="-m32 -Wno-narrowing" "CXXFLAGS=-m32 -Wno-narrowing -fpermissive" "LDFLAGS=-m32"
mk
inst .libs/libtcmalloc_minimal.so.4
cd ../
cd SDL2-src
conf ./configure --build=i686-pc-linux-gnu "CFLAGS=-m32 -Wno-narrowing" "CXXFLAGS=-m32 -Wno-narrowing -fpermissive" "LDFLAGS=-m32" --enable-input-tslib=no
mk
inst build/.libs/libSDL2.so
cd ../
cd protobuf-2.6.1
conf ./configure --build=i686-pc-linux-gnu "CFLAGS=-m32 -Wno-narrowing" "CXXFLAGS=-m32 -Wno-narrowing -fpermissive" "LDFLAGS=-m32"
mk
cd ../
cd StubSteamAPI/
mk
inst libsteam_api.so
cd ../
cd openssl
conf ./Configure -m32 linux-generic32
mk
cp libcrypto.a ../../lib/common/ubuntu12_32/
cd ../
cd cryptopp
mk IS_X86=1 IS_X64=0 CC='gcc -m32 -msse4 -fPIC' CXX='g++ -m32 -msse4 -D_GLIBCXX_USE_CXX11_ABI=0'
cp libcryptopp.a ../../lib/common/ubuntu12_32/
cd ../
cd libjpeg
conf ./configure --build=i686-pc-linux-gnu "CFLAGS=-m32 -Wno-narrowing" "CXXFLAGS=-m32 -Wno-narrowing -fpermissive" "LDFLAGS=-m32"
mk
cp .libs/libjpeg.a ../../lib/common/linux32
inst .libs/libjpeg.a
cd ../
cd libpng
conf ./configure --build=i686-pc-linux-gnu "CFLAGS=-m32 -Wno-narrowing" "CXXFLAGS=-m32 -Wno-narrowing -fpermissive" "LDFLAGS=-m32"
mk
cp .libs/libpng16.a ../../lib/public/linux32/libpng.a
cd ../
cd zlib
CFLAGS="-m32" LDFLAGS="-m32" conf ./configure
#conf ./configure --build=i686-pc-linux-gnu "CFLAGS=-m32 -Wno-narrowing" "CXXFLAGS=-m32 -Wno-narrowing -fpermissive" "LDFLAGS=-m32"
mk
inst libz.a
cd ../
cd libedit-3.1
conf ./configure --build=i686-pc-linux-gnu "CFLAGS=-m32 -Wno-narrowing" "CXXFLAGS=-m32 -Wno-narrowing -fpermissive" "LDFLAGS=-m32"
mk
cd ../
-55
View File
@@ -1,55 +0,0 @@
# Appveyor's documentation is at https://www.appveyor.com/docs/build-phase/,
# and a sample configuration file is at https://www.appveyor.com/docs/appveyor-yml/.
# I have to admit its a bit complex and I don't fully understand it.
version: 1.0.{build}
clone_depth: 5
skip_tags: true
configuration:
- Debug
- Release
platform:
- Win32
- x64
image:
- Visual Studio 2019
- Visual Studio 2017
- Visual Studio 2015
- Visual Studio 2013
environment:
matrix:
- BUILD_MODE: MSBuild
# Disable build through solution file
build: off
# Build through commands in script below
test_script:
- ps: >-
msbuild /t:Build /p:platform="$env:platform" /p:configuration="$env:configuration" cryptlib.vcxproj
msbuild /t:Build /p:platform="$env:platform" /p:configuration="$env:configuration" cryptest.vcxproj
msbuild /t:CopyCryptestToRoot cryptest.vcxproj
.\cryptest.exe v
.\cryptest.exe tv all
notifications:
- provider: Email
to:
- cryptopp-build@googlegroups.com
on_build_success: true
on_build_failure: true
-59
View File
@@ -1,59 +0,0 @@
# https://cirrus-ci.org/examples/
# https://github.com/curl/curl/blob/master/.cirrus.yml
# FreeBSD seems to have constant version problems, which requires IGNORE_OSVERSION.
env:
CIRRUS_CLONE_DEPTH: 5
IGNORE_OSVERSION: yes
task:
matrix:
- name: Debug build, FreeBSD 12.1
freebsd_instance:
image_family: freebsd-12-1
pkginstall_script:
- pkg update -f
- pkg install -y gmake
configure_script:
compile_script:
- CXXFLAGS="-DDEBUG -g3 -O0" gmake -j 3
test_script:
- ./cryptest.exe v
- ./cryptest.exe tv all
- name: Release build, FreeBSD 12.1
freebsd_instance:
image_family: freebsd-12-1
pkginstall_script:
- pkg update -f
- pkg install -y gmake
configure_script:
compile_script:
- gmake -j 3
test_script:
- ./cryptest.exe v
- ./cryptest.exe tv all
- name: Debug build, FreeBSD 13.0 (snap)
freebsd_instance:
image_family: freebsd-13-0-snap
pkginstall_script:
- pkg update -f
- pkg install -y gmake
configure_script:
compile_script:
- CXXFLAGS="-DDEBUG -g3 -O0" gmake -j 3
test_script:
- ./cryptest.exe v
- ./cryptest.exe tv all
- name: Release build, FreeBSD 13.0 (snap)
freebsd_instance:
image_family: freebsd-13-0-snap
pkginstall_script:
- pkg update -f
- pkg install -y gmake
configure_script:
compile_script:
- gmake -j 3
test_script:
- ./cryptest.exe v
- ./cryptest.exe tv all
-655
View File
@@ -1,655 +0,0 @@
# In the YML below each job gets an environment that includes
# BUILD_OS and BUILD_MODE. The variables are used in the driver
# scripts and is used to select a test. For example, BUILD_OS=linux
# and BUILD_MODE=all means run 'make all' on Linux. The Android
# tests specify a ANDROID_API, ANDROID_CPU; and the iOS tests
# specify IOS_SDK and IOS_CPU. They are exported for the underlying
# setenv-*.sh scripts.
# DO NOT create top level (global) keys like env, arch, os, compiler.
# The top level/global keys invoke [unwanted] matrix expansion. Also
# see https://stackoverflow.com/q/58473000/608639 and
# https://docs.travis-ci.com/user/reference/overview/ and
# https://docs.travis-ci.com/user/multi-cpu-architectures and
# https://github.com/travis-ci/travis-yml/blob/master/schema.json.
language: cpp
dist: bionic
git:
depth: 5
# Use jobs rather than matrix since we are precisely
# specifiying our test cases. Do not move any of the
# keys (env, os, arch, compiler, etc) into global.
# Putting them in global invokes the matrix expansion.
jobs:
include:
- name: Standard build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=all
- name: Native build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=native
- name: No-asm build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=no-asm
- name: Debug build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- name: Asan build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=asan
- name: UBsan build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=ubsan
- name: PEM build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=pem
- name: Autotools build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=autotools
- name: CMake build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=cmake
- name: Standard build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=all
- name: Native build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=native
- name: No-asm build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=no-asm
- name: Debug build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- name: Asan build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=asan
- name: UBsan build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=ubsan
- name: PEM build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=pem
- name: Autotools build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=autotools
- name: CMake build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=cmake
- name: Standard build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=all
- name: Standard build (64-bit), Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- CXXFLAGS="-DNDEBUG -g2 -O3 -arch x86_64"
- BUILD_OS=osx
- BUILD_MODE=all
- name: Standard build (32-bit), Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- CXXFLAGS="-DNDEBUG -g2 -O3 -arch i386"
- BUILD_OS=osx
- BUILD_MODE=all
- name: Standard build (fat), Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- CXXFLAGS="-DNDEBUG -g2 -O3 -arch i386 -arch x86_64"
- BUILD_OS=osx
- BUILD_MODE=osx-fat
- name: Native build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=native
- name: No-asm build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=no-asm
- name: Debug build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=debug
- name: Asan build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=asan
- name: UBsan build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=ubsan
- name: PEM build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=pem
- name: Autotools build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=autotools
- name: CMake build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=cmake
- name: Standard build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=all
- name: Native build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=native
- name: No-asm build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=no-asm
- name: Debug build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- name: Asan build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=asan
- name: UBsan build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=ubsan
- name: PEM build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=pem
- name: Autotools build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=autotools
- name: CMake build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=cmake
- name: Standard build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=all
- name: Native build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=native
- name: No-asm build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=no-asm
- name: Debug build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- name: Asan build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=asan
- name: UBsan build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=ubsan
- name: PEM build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=pem
- name: Autotools build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=autotools
- name: CMake build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=cmake
- name: Standard build, GCC, Linux, ppc64le
os: linux
arch: ppc64le
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=all
- name: Debug build, GCC, Linux, ppc64le
os: linux
arch: ppc64le
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- name: Standard build, Clang, Linux, ppc64le
os: linux
arch: ppc64le
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=all
- CC=clang-8
- CXX=clang++-8
- name: Debug build, Clang, Linux, ppc64le
os: linux
arch: ppc64le
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- CC=clang-8
- CXX=clang++-8
- name: Standard build, GCC, Linux, s390x
os: linux
arch: s390x
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=all
- name: Debug build, GCC, Linux, s390x
os: linux
arch: s390x
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- name: Standard build, Clang, Linux, s390x
os: linux
arch: s390x
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=all
- CC=clang-8
- CXX=clang++-8
- name: Debug build, Clang, Linux, s390x
os: linux
arch: s390x
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- CC=clang-8
- CXX=clang++-8
- name: Android, armv7a, Linux
os: linux
arch: amd64
env:
- BUILD_OS=linux
- BUILD_MODE=android
- ANDROID_CPU=armv7a
- ANDROID_API=23
- ANDROID_SDK_ROOT="$HOME/android-sdk"
- ANDROID_NDK_ROOT="$HOME/android-ndk"
- name: Android, aarch64, Linux
os: linux
arch: amd64
env:
- BUILD_OS=linux
- BUILD_MODE=android
- ANDROID_CPU=aarch64
- ANDROID_API=23
- ANDROID_SDK_ROOT="$HOME/android-sdk"
- ANDROID_NDK_ROOT="$HOME/android-ndk"
- name: Android, x86, Linux
os: linux
arch: amd64
env:
- BUILD_OS=linux
- BUILD_MODE=android
- ANDROID_CPU=x86
- ANDROID_API=23
- ANDROID_SDK_ROOT="$HOME/android-sdk"
- ANDROID_NDK_ROOT="$HOME/android-ndk"
- name: Android, x86_64, Linux
os: linux
arch: amd64
env:
- BUILD_OS=linux
- BUILD_MODE=android
- ANDROID_CPU=x86_64
- ANDROID_API=23
- ANDROID_SDK_ROOT="$HOME/android-sdk"
- ANDROID_NDK_ROOT="$HOME/android-ndk"
- name: iPhoneOS, armv7, iOS
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=armv7s
- IOS_SDK=iPhoneOS
- name: iPhoneOS, arm64, iOS
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=arm64
- IOS_SDK=iPhoneOS
- name: AppleTVOS, arm64, iOS
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=arm64
- IOS_SDK=AppleTVOS
- name: WatchOS, armv7, iOS
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=armv7k
- IOS_SDK=WatchOS
- name: iPhoneSimulator, i386, OS X
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=i386
- IOS_SDK=iPhoneSimulator
- name: iPhoneSimulator, x86_64, OS X
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=x86_64
- IOS_SDK=iPhoneSimulator
- name: AppleTVSimulator, x86_64, OS X
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=x86_64
- IOS_SDK=AppleTVSimulator
- name: WatchSimulator, i386, OS X
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=i386
- IOS_SDK=WatchSimulator
allow_failures:
# Clang has a fair amount of trouble
# on platforms Apple does not support
- os: linux
arch: s390x
compiler: clang
# Clang 7.0 and below will likely have trouble on ppc64le
# due to https://bugs.llvm.org/show_bug.cgi?id=39704.
- os: linux
arch: ppc64le
compiler: clang
before_install:
- |
if [[ "$BUILD_OS" == "linux" ]] && [[ "$BUILD_MODE" == "android" ]]; then
# https://github.com/travis-ci/travis-ci/issues/9037
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A145
sudo apt-get -qq -y update
bash TestScripts/install-ndk.sh
fi
if [[ "$BUILD_OS" == "linux" ]] && [[ "$BUILD_MODE" == "autotools" ]]; then
# https://github.com/travis-ci/travis-ci/issues/9037
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A145
sudo apt-get -qq -y install autoconf automake libtool
fi
# Clang 7 compiler is completely broken on PPC64 and s390x
if [[ "$TRAVIS_CPU_ARCH" == "ppc64le" ]] || [[ "$TRAVIS_CPU_ARCH" == "s390x" ]]; then
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_COMPILER" == "clang" ]]; then
# https://github.com/travis-ci/travis-ci/issues/9037
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A145
sudo apt-get -qq -y install --no-install-recommends clang-8
fi
fi
script:
- |
if [[ "$BUILD_MODE" == "ios" ]]; then
source TestScripts/setenv-ios.sh
make -f GNUmakefile-cross -j 2 all static dynamic
elif [[ "$BUILD_MODE" == "android" ]]; then
source TestScripts/setenv-android.sh
make -f GNUmakefile-cross -j 2 all static dynamic
elif [[ "$BUILD_MODE" == "autotools" ]]; then
bash TestScripts/cryptest-autotools.sh
elif [[ "$BUILD_MODE" == "cmake" ]]; then
bash TestScripts/cryptest-cmake.sh
elif [[ "$BUILD_MODE" == "pem" ]]; then
bash TestScripts/cryptest-pem.sh
elif [[ "$BUILD_MODE" == "osx-fat" ]]; then
CXXFLAGS="-DNDEBUG -g2 -O3 -arch i386 -arch x86_64" make -j 2
arch -i386 ./cryptest.exe v
arch -i386 ./cryptest.exe tv all
arch -x86_64 ./cryptest.exe v
arch -x86_64 ./cryptest.exe tv all
elif [[ "$BUILD_MODE" == "debug" ]]; then
CXXFLAGS="-DDEBUG -g2 -O1" make -j 2
./cryptest.exe v
./cryptest.exe tv all
else
make "$BUILD_MODE" -j 2
./cryptest.exe v
./cryptest.exe tv all
fi
# Whitelist branches to avoid testing feature branches twice
branches:
only:
- master
- /\/ci$/
notifications:
email:
recipients:
- cryptopp-build@googlegroups.com
on_success: always # default: change
on_failure: always # default: always
+12 -16
View File
@@ -7,19 +7,15 @@
NAMESPACE_BEGIN(CryptoPP) NAMESPACE_BEGIN(CryptoPP)
#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void ThreeWay_TestInstantiations() void ThreeWay_TestInstantiations()
{ {
ThreeWay::Encryption x1; ThreeWay::Encryption x1;
ThreeWay::Decryption x2; ThreeWay::Decryption x2;
} }
#endif
namespace static const word32 START_E = 0x0b0b; // round constant of first encryption round
{ static const word32 START_D = 0xb1b1; // round constant of first decryption round
const word32 START_E = 0x0b0b; // round constant of first encryption round static const word32 RC_MODULUS = 0x11011;
const word32 START_D = 0xb1b1; // round constant of first decryption round
}
static inline word32 reverseBits(word32 a) static inline word32 reverseBits(word32 a)
{ {
@@ -36,14 +32,14 @@ static inline word32 reverseBits(word32 a)
a2 = t; \ a2 = t; \
} }
#define pi_gamma_pi(a0, a1, a2) \ #define pi_gamma_pi(a0, a1, a2) \
{ \ { \
word32 b0, b2; \ word32 b0, b2; \
b2 = rotlConstant<1>(a2); \ b2 = rotlFixed(a2, 1U); \
b0 = rotlConstant<22>(a0); \ b0 = rotlFixed(a0, 22U); \
a0 = rotlConstant<1>(b0 ^ (a1|(~b2))); \ a0 = rotlFixed(b0 ^ (a1|(~b2)), 1U); \
a2 = rotlConstant<22>(b2 ^ (b0|(~a1))); \ a2 = rotlFixed(b2 ^ (b0|(~a1)), 22U);\
a1 ^= (b2|(~b0)); \ a1 ^= (b2|(~b0)); \
} }
// thanks to Paulo Barreto for this optimized theta() // thanks to Paulo Barreto for this optimized theta()
@@ -51,7 +47,7 @@ static inline word32 reverseBits(word32 a)
{ \ { \
word32 b0, b1, c; \ word32 b0, b1, c; \
c = a0 ^ a1 ^ a2; \ c = a0 ^ a1 ^ a2; \
c = rotlConstant<16>(c) ^ rotlConstant<8>(c); \ c = rotlFixed(c, 16U) ^ rotlFixed(c, 8U); \
b0 = (a0 << 24) ^ (a2 >> 8) ^ (a1 << 8) ^ (a0 >> 24); \ b0 = (a0 << 24) ^ (a2 >> 8) ^ (a1 << 8) ^ (a0 >> 24); \
b1 = (a1 << 24) ^ (a0 >> 8) ^ (a2 << 8) ^ (a1 >> 24); \ b1 = (a1 << 24) ^ (a0 >> 8) ^ (a2 << 8) ^ (a1 >> 24); \
a0 ^= c ^ b0; \ a0 ^= c ^ b0; \
+6 -16
View File
@@ -1,29 +1,23 @@
// 3way.h - originally written and placed in the public domain by Wei Dai
/// \file 3way.h
/// \brief Classes for the 3-Way block cipher
#ifndef CRYPTOPP_THREEWAY_H #ifndef CRYPTOPP_THREEWAY_H
#define CRYPTOPP_THREEWAY_H #define CRYPTOPP_THREEWAY_H
#include "config.h" /** \file
*/
#include "seckey.h" #include "seckey.h"
#include "secblock.h" #include "secblock.h"
NAMESPACE_BEGIN(CryptoPP) NAMESPACE_BEGIN(CryptoPP)
/// \brief ThreeWay block cipher information //! _
struct ThreeWay_Info : public FixedBlockSize<12>, public FixedKeyLength<12>, public VariableRounds<11> struct ThreeWay_Info : public FixedBlockSize<12>, public FixedKeyLength<12>, public VariableRounds<11>
{ {
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "3-Way";} static const char *StaticAlgorithmName() {return "3-Way";}
}; };
/// \brief ThreeWay block cipher /// <a href="http://www.weidai.com/scan-mirror/cs.html#3-Way">3-Way</a>
/// \sa <a href="http://www.cryptopp.com/wiki/3-Way">3-Way</a>
class ThreeWay : public ThreeWay_Info, public BlockCipherDocumentation class ThreeWay : public ThreeWay_Info, public BlockCipherDocumentation
{ {
/// \brief Class specific implementation and overrides used to operate the cipher.
/// \details Implementations and overrides in \p Base apply to both \p ENCRYPTION and \p DECRYPTION directions
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<ThreeWay_Info> class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<ThreeWay_Info>
{ {
public: public:
@@ -34,16 +28,12 @@ class ThreeWay : public ThreeWay_Info, public BlockCipherDocumentation
FixedSizeSecBlock<word32, 3> m_k; FixedSizeSecBlock<word32, 3> m_k;
}; };
/// \brief Class specific methods used to operate the cipher in the forward direction.
/// \details Implementations and overrides in \p Enc apply to \p ENCRYPTION.
class CRYPTOPP_NO_VTABLE Enc : public Base class CRYPTOPP_NO_VTABLE Enc : public Base
{ {
public: public:
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
}; };
/// \brief Class specific methods used to operate the cipher in the reverse direction.
/// \details Implementations and overrides in \p Dec apply to \p DECRYPTION.
class CRYPTOPP_NO_VTABLE Dec : public Base class CRYPTOPP_NO_VTABLE Dec : public Base
{ {
public: public:
+865 -1681
View File
File diff suppressed because it is too large Load Diff
-639
View File
@@ -1,639 +0,0 @@
3way.cpp
3way.h
adhoc.cpp.proto
adv_simd.h
adler32.cpp
adler32.h
aes.h
aes_armv4.h
aes_armv4.S
algebra.cpp
algebra.h
algparam.cpp
algparam.h
allocate.cpp
allocate.h
arc4.cpp
arc4.h
ariatab.cpp
aria.cpp
aria_simd.cpp
aria.h
argnames.h
arm_simd.h
asn.cpp
asn.h
authenc.cpp
authenc.h
base32.cpp
base32.h
base64.cpp
base64.h
basecode.cpp
basecode.h
bench.h
bds10.zip
bench1.cpp
bench2.cpp
bench3.cpp
bfinit.cpp
blake2.cpp
blake2s_simd.cpp
blake2b_simd.cpp
blake2.h
blowfish.cpp
blowfish.h
blumshub.cpp
blumshub.h
camellia.cpp
camellia.h
cast.cpp
cast.h
casts.cpp
cbcmac.cpp
cbcmac.h
ccm.cpp
ccm.h
chacha.cpp
chacha_avx.cpp
chacha_simd.cpp
chacha.h
chachapoly.cpp
chachapoly.h
cham.cpp
cham_simd.cpp
cham.h
channels.cpp
channels.h
cmac.cpp
cmac.h
config.h
config_align.h
config_asm.h
config_cpu.h
config_cxx.h
config_dll.h
config_int.h
config_misc.h
config_ns.h
config_os.h
config_ver.h
cpu.cpp
cpu.h
crc.cpp
crc_simd.cpp
crc.h
cryptdll.vcxproj
cryptdll.vcxproj.filters
cryptest.sln
cryptest.vcxproj
cryptest.vcxproj.user
cryptest.vcxproj.filters
cryptest.mapfile
cryptest.nmake
cryptlib.cpp
cryptlib.h
cryptlib.vcxproj
cryptlib.vcxproj.filters
cryptopp.rc
darn.cpp
darn.h
datatest.cpp
default.cpp
default.h
des.cpp
des.h
dessp.cpp
dh.cpp
dh.h
dh2.cpp
dh2.h
dll.cpp
dll.h
dlltest.cpp
dlltest.vcxproj
dlltest.vcxproj.filters
dmac.h
drbg.h
donna.h
donna_32.h
donna_64.h
donna_sse.h
donna_32.cpp
donna_64.cpp
donna_sse.cpp
dsa.cpp
dsa.h
eax.cpp
eax.h
ec2n.cpp
ec2n.h
eccrypto.cpp
eccrypto.h
ecp.cpp
ecp.h
ecpoint.h
elgamal.cpp
elgamal.h
emsa2.cpp
emsa2.h
eprecomp.cpp
eprecomp.h
esign.cpp
esign.h
factory.h
fhmqv.cpp
fhmqv.h
files.cpp
files.h
filters.cpp
filters.h
fips140.cpp
fips140.h
fipsalgt.cpp
fipstest.cpp
fltrimpl.h
gcm_simd.cpp
gcm.cpp
gcm.h
gf256.cpp
gf256.h
gf2_32.cpp
gf2_32.h
gf2n_simd.cpp
gf2n.cpp
gf2n.h
gfpcrypt.cpp
gfpcrypt.h
gost.cpp
gost.h
gzip.cpp
gzip.h
hashfwd.h
hc128.cpp
hc128.h
hc256.cpp
hc256.h
hex.cpp
hex.h
hight.h
hight.cpp
hkdf.h
hmac.cpp
hmac.h
hmqv.cpp
hmqv.h
hrtimer.cpp
hrtimer.h
ida.cpp
ida.h
idea.cpp
idea.h
integer.cpp
integer.h
iterhash.cpp
iterhash.h
kalynatab.cpp
kalyna.cpp
kalyna.h
keccak.cpp
keccak_core.cpp
keccak_simd.cpp
keccak.h
lubyrack.h
lea.cpp
lea_simd.cpp
lea.h
luc.cpp
luc.h
mars.cpp
mars.h
marss.cpp
md2.cpp
md2.h
md4.cpp
md4.h
md5.cpp
md5.h
mdc.h
mersenne.h
misc.cpp
misc.h
modarith.h
modes.cpp
modes.h
modexppc.h
mqueue.cpp
mqueue.h
mqv.cpp
mqv.h
naclite.h
nbtheory.cpp
nbtheory.h
neon_simd.cpp
nr.h
oaep.cpp
oaep.h
oids.h
osrng.cpp
osrng.h
ossig.h
padlkrng.cpp
padlkrng.h
panama.cpp
panama.h
pch.cpp
pch.h
pkcspad.cpp
pkcspad.h
poly1305.cpp
poly1305.h
polynomi.cpp
polynomi.h
ppc_power7.cpp
ppc_power8.cpp
ppc_power9.cpp
ppc_simd.cpp
ppc_simd.h
pssr.cpp
pssr.h
pubkey.cpp
pubkey.h
pwdbased.h
queue.cpp
queue.h
rabin.cpp
rabin.h
randpool.cpp
randpool.h
rabbit.cpp
rabbit.h
rc2.cpp
rc2.h
rc5.cpp
rc5.h
rc6.cpp
rc6.h
rdrand.asm
rdrand.cpp
rdrand.h
rdseed.asm
rdtables.cpp
regtest1.cpp
regtest2.cpp
regtest3.cpp
regtest4.cpp
resource.h
rijndael.cpp
rijndael_simd.cpp
rijndael.h
ripemd.cpp
ripemd.h
rng.cpp
rng.h
rsa.cpp
rsa.h
rw.cpp
rw.h
safer.cpp
safer.h
salsa.cpp
salsa.h
scrypt.cpp
scrypt.h
seal.cpp
seal.h
secblock.h
secblockfwd.h
seckey.h
seed.cpp
seed.h
serpent.cpp
serpent.h
serpentp.h
sha.cpp
sha_simd.cpp
sha.h
sha1_armv4.h
sha1_armv4.S
sha256_armv4.h
sha256_armv4.S
sha512_armv4.h
sha512_armv4.S
sha3.cpp
sha3.h
shacal2.cpp
shacal2_simd.cpp
shacal2.h
shake.cpp
shake.h
shark.cpp
shark.h
sharkbox.cpp
simple.cpp
simple.h
siphash.h
simeck.cpp
simeck.h
simon.cpp
simon128_simd.cpp
simon.h
skipjack.cpp
skipjack.h
sm3.cpp
sm3.h
sm4.cpp
sm4_simd.cpp
sm4.h
smartptr.h
sosemanuk.cpp
sosemanuk.h
speck.cpp
speck128_simd.cpp
speck.h
square.cpp
square.h
squaretb.cpp
sse_simd.cpp
stdcpp.h
strciphr.cpp
strciphr.h
tea.cpp
tea.h
test.cpp
trap.h
tftables.cpp
threefish.cpp
threefish.h
tiger.cpp
tiger.h
tigertab.cpp
trunhash.h
ttmac.cpp
ttmac.h
tweetnacl.cpp
tweetnacl.h
twofish.cpp
twofish.h
validat0.cpp
validat1.cpp
validat2.cpp
validat3.cpp
validat4.cpp
validat5.cpp
validat6.cpp
validat7.cpp
validat8.cpp
validat9.cpp
validat10.cpp
validate.h
vmac.cpp
vmac.h
vs2005.zip
wake.cpp
wake.h
whrlpool.cpp
whrlpool.h
words.h
x64dll.asm
x64masm.asm
xed25519.h
xed25519.cpp
xtr.cpp
xtr.h
xtrcrypt.cpp
xtrcrypt.h
xts.cpp
xts.h
zdeflate.cpp
zdeflate.h
zinflate.cpp
zinflate.h
zlib.cpp
zlib.h
Doxyfile
GNUmakefile
GNUmakefile-cross
License.txt
Readme.txt
History.txt
Install.txt
Filelist.txt
cryptopp.supp
TestData/3desval.dat
TestData/3wayval.dat
TestData/aria.dat
TestData/camellia.dat
TestData/cast128v.dat
TestData/cast256v.dat
TestData/defdmac1.bin
TestData/defdmac2.bin
TestData/descert.dat
TestData/dh1024.dat
TestData/dh2048.dat
TestData/dlie1024.dat
TestData/dlie2048.dat
TestData/dsa1024.dat
TestData/dsa1024b.dat
TestData/dsa512.dat
TestData/ecies_p160.dat
TestData/ecies_t163.dat
TestData/ed25519.dat
TestData/ed25519_ver.dat
TestData/ed25519v0.dat
TestData/ed25519v1.dat
TestData/elgc1024.dat
TestData/esig1023.dat
TestData/esig1536.dat
TestData/esig2046.dat
TestData/fhmqv160.dat
TestData/fhmqv256.dat
TestData/fhmqv384.dat
TestData/fhmqv512.dat
TestData/gostval.dat
TestData/hmqv160.dat
TestData/hmqv256.dat
TestData/hmqv384.dat
TestData/hmqv512.dat
TestData/ideaval.dat
TestData/luc1024.dat
TestData/luc2048.dat
TestData/lucc1024.dat
TestData/lucc512.dat
TestData/lucd1024.dat
TestData/lucd512.dat
TestData/lucs1024.dat
TestData/lucs512.dat
TestData/marsval.dat
TestData/mqv1024.dat
TestData/mqv2048.dat
TestData/nr1024.dat
TestData/nr2048.dat
TestData/rabi1024.dat
TestData/rabi2048.dat
TestData/rc2val.dat
TestData/rc5val.dat
TestData/rc6val.dat
TestData/rijndael.dat
TestData/rsa1024.dat
TestData/rsa2048.dat
TestData/rsa2048a.dat
TestData/rsa400pb.dat
TestData/rsa400pv.dat
TestData/rsa512a.dat
TestData/rw1024.dat
TestData/rw2048.dat
TestData/saferval.dat
TestData/serpentv.dat
TestData/shacal2v.dat
TestData/sharkval.dat
TestData/skipjack.dat
TestData/squareva.dat
TestData/twofishv.dat
TestData/usage.dat
TestData/x25519.dat
TestData/x25519v0.dat
TestData/x25519v1.dat
TestData/xtrdh171.dat
TestData/xtrdh342.dat
TestVectors/aead.txt
TestVectors/aes.txt
TestVectors/all.txt
TestVectors/aria.txt
TestVectors/blake2.txt
TestVectors/blake2b.txt
TestVectors/blake2s.txt
TestVectors/camellia.txt
TestVectors/ccm.txt
TestVectors/chacha.txt
TestVectors/chacha_tls.txt
TestVectors/chacha20poly1305.txt
TestVectors/cham.txt
TestVectors/cmac.txt
TestVectors/dlies.txt
TestVectors/dsa.txt
TestVectors/dsa_1363.txt
TestVectors/dsa_rfc6979.txt
TestVectors/eax.txt
TestVectors/esign.txt
TestVectors/gcm.txt
TestVectors/hc128.txt
TestVectors/hc256.txt
TestVectors/hight.txt
TestVectors/hkdf.txt
TestVectors/hmac.txt
TestVectors/kalyna.txt
TestVectors/keccak.txt
TestVectors/lea.txt
TestVectors/mars.txt
TestVectors/nr.txt
TestVectors/panama.txt
TestVectors/poly1305aes.txt
TestVectors/poly1305_tls.txt
TestVectors/rabbit.txt
TestVectors/Readme.txt
TestVectors/rsa_oaep.txt
TestVectors/rsa_pkcs1_1_5.txt
TestVectors/rsa_pss.txt
TestVectors/rw.txt
TestVectors/salsa.txt
TestVectors/seal.txt
TestVectors/seed.txt
TestVectors/sha.txt
TestVectors/sha1_160_fips_180.txt
TestVectors/sha1_fips_180.txt
TestVectors/sha2.txt
TestVectors/sha2_224_fips_180.txt
TestVectors/sha2_256_fips_180.txt
TestVectors/sha2_384_fips_180.txt
TestVectors/sha2_512_fips_180.txt
TestVectors/sha2_fips_180.txt
TestVectors/sha3.txt
TestVectors/sha3_224_fips_202.txt
TestVectors/sha3_256_fips_202.txt
TestVectors/sha3_384_fips_202.txt
TestVectors/sha3_512_fips_202.txt
TestVectors/sha3_fips_202.txt
TestVectors/shake.txt
TestVectors/shacal2.txt
TestVectors/simeck.txt
TestVectors/simon.txt
TestVectors/siphash.txt
TestVectors/skipjack.txt
TestVectors/sm3.txt
TestVectors/sm4.txt
TestVectors/sosemanuk.txt
TestVectors/speck.txt
TestVectors/tea.txt
TestVectors/threefish.txt
TestVectors/ttmac.txt
TestVectors/vmac.txt
TestVectors/wake.txt
TestVectors/whrlpool.txt
TestVectors/xchacha.txt
TestVectors/xts.txt
TestPrograms/test_32bit.cxx
TestPrograms/test_64bit.cxx
TestPrograms/test_arm_acle_header.cxx
TestPrograms/test_arm_aes.cxx
TestPrograms/test_arm_asimd.cxx
TestPrograms/test_arm_crc.cxx
TestPrograms/test_arm_neon.cxx
TestPrograms/test_arm_neon_header.cxx
TestPrograms/test_arm_pmull.cxx
TestPrograms/test_arm_sha1.cxx
TestPrograms/test_arm_sha256.cxx
TestPrograms/test_arm_sha3.cxx
TestPrograms/test_arm_sha512.cxx
TestPrograms/test_arm_sm3.cxx
TestPrograms/test_arm_sm4.cxx
TestPrograms/test_asm_mixed.cxx
TestPrograms/test_cxx11_alignas.cxx
TestPrograms/test_cxx11_alignof.cxx
TestPrograms/test_cxx11_assert.cxx
TestPrograms/test_cxx11_atomic.cxx
TestPrograms/test_cxx11_auto.cxx
TestPrograms/test_cxx11_constexpr.cxx
TestPrograms/test_cxx11.cxx
TestPrograms/test_cxx11_deletefn.cxx
TestPrograms/test_cxx11_staticinit.cxx
TestPrograms/test_cxx11_enumtype.cxx
TestPrograms/test_cxx11_initializer.cxx
TestPrograms/test_cxx11_lambda.cxx
TestPrograms/test_cxx11_noexcept.cxx
TestPrograms/test_cxx11_nullptr.cxx
TestPrograms/test_cxx11_sync.cxx
TestPrograms/test_cxx11_vartemplates.cxx
TestPrograms/test_cxx14.cxx
TestPrograms/test_cxx17_assert.cxx
TestPrograms/test_cxx17.cxx
TestPrograms/test_cxx17_exceptions.cxx
TestPrograms/test_cxx98_exception.cxx
TestPrograms/test_cxx.cxx
TestPrograms/test_glibc.cxx
TestPrograms/test_newlib.cxx
TestPrograms/test_ppc_aes.cxx
TestPrograms/test_ppc_altivec.cxx
TestPrograms/test_ppc_power7.cxx
TestPrograms/test_ppc_power8.cxx
TestPrograms/test_ppc_power9.cxx
TestPrograms/test_ppc_sha.cxx
TestPrograms/test_ppc_vmull.cxx
TestPrograms/test_pthreads.cxx
TestPrograms/test_x86_aes.cxx
TestPrograms/test_x86_avx2.cxx
TestPrograms/test_x86_avx512.cxx
TestPrograms/test_x86_avx.cxx
TestPrograms/test_x86_clmul.cxx
TestPrograms/test_x86_cpuid.cxx
TestPrograms/test_x86_rdrand.cxx
TestPrograms/test_x86_rdseed.cxx
TestPrograms/test_x86_sha.cxx
TestPrograms/test_x86_sse2.cxx
TestPrograms/test_x86_sse3.cxx
TestPrograms/test_x86_sse41.cxx
TestPrograms/test_x86_sse42.cxx
TestPrograms/test_x86_ssse3.cxx
TestPrograms/test_x86_via_aes.cxx
TestPrograms/test_x86_via_rng.cxx
TestPrograms/test_x86_via_sha.cxx
Vendored Executable → Regular
+173 -1635
View File
File diff suppressed because it is too large Load Diff
-983
View File
@@ -1,983 +0,0 @@
# https://www.gnu.org/software/make/manual/make.html#Makefile-Conventions
# and https://www.gnu.org/prep/standards/standards.html
SHELL = /bin/sh
# If needed
TMPDIR ?= /tmp
# Used for ARMv7a and NEON. Android hard codes softfp
FP_ABI ?= hard
# Used for feature tests
TOUT ?= a.out
TOUT := $(strip $(TOUT))
# Allow override for the cryptest.exe recipe. Change to
# ./libcryptopp.so or ./libcryptopp.dylib to suit your
# taste. https://github.com/weidai11/cryptopp/issues/866
LINK_LIBRARY ?= libcryptopp.a
LINK_LIBRARY_PATH ?= ./
# Default CXXFLAGS if none were provided
CXXFLAGS ?= -DNDEBUG -g2 -O3 -fPIC -pipe
AR ?= ar
ARFLAGS ?= cr
RANLIB ?= ranlib
CP ?= cp
MV ?= mv
CHMOD ?= chmod
MKDIR ?= mkdir -p
GREP ?= grep
SED ?= sed
LN ?= ln -sf
LDCONF ?= /sbin/ldconfig -n
IS_IOS ?= 0
IS_ANDROID ?= 0
IS_ARM_EMBEDDED ?= 0
# Clang is reporting armv8l-unknown-linux-gnueabihf
# for ARMv7 images on Aarch64 hardware.
MACHINEX := $(shell $(CXX) $(CXXFLAGS) -dumpmachine 2>/dev/null)
HOSTX := $(shell echo $(MACHINEX) | cut -f 1 -d '-')
ifeq ($(HOSTX),)
HOSTX := $(shell uname -m 2>/dev/null)
endif
IS_LINUX := $(shell echo $(MACHINEX) | $(GREP) -i -c "Linux")
# Can be used by Android and Embeeded cross-compiles. Disable by default because
# Android and embedded users typically don't run this configuration.
HAS_SOLIB_VERSION ?= 0
# Formely adhoc.cpp was created from adhoc.cpp.proto when needed.
# This is now needed because ISA tests are performed using adhoc.cpp.
ifeq ($(wildcard adhoc.cpp),)
$(shell cp adhoc.cpp.proto adhoc.cpp)
endif
###########################################################
##### General Variables #####
###########################################################
# Default prefix for make install
ifeq ($(PREFIX),)
PREFIX = /usr/local
endif
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
ifeq ($(DATADIR),)
DATADIR := $(PREFIX)/share
endif
ifeq ($(LIBDIR),)
LIBDIR := $(PREFIX)/lib
endif
ifeq ($(BINDIR),)
BINDIR := $(PREFIX)/bin
endif
ifeq ($(INCLUDEDIR),)
INCLUDEDIR := $(PREFIX)/include
endif
# We honor ARFLAGS, but the "v" option used by default causes a noisy make
ifeq ($(ARFLAGS),rv)
ARFLAGS = r
endif
# Sadly, we can't actually use GCC_PRAGMA_AWARE because of GCC bug 53431.
# Its a shame because GCC has so much to offer by the way of analysis.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431
ifneq ($(CLANG_COMPILER),0)
CXXFLAGS += -Wall
endif
###########################################################
##### iOS #####
###########################################################
# iOS cross-compile configuration.
# See http://www.cryptopp.com/wiki/iOS_(Command_Line).
ifeq ($(IS_IOS),1)
CXXFLAGS += $(IOS_CXXFLAGS) -stdlib=libc++
CXXFLAGS += --sysroot "$(IOS_SYSROOT)"
AR = libtool
ARFLAGS = -static -o
endif
###########################################################
##### Android #####
###########################################################
# Android cross-compile configuration.
# See http://www.cryptopp.com/wiki/Android_(Command_Line).
ifeq ($(IS_ANDROID),1)
CXXFLAGS += $(ANDROID_CXXFLAGS) -D__ANDROID_API__=$(ANDROID_API)
CXXFLAGS += --sysroot=$(ANDROID_SYSROOT)
CXXFLAGS += -Wa,--noexecstack
# Source files copied into PWD for Android cpu-features
# setenv-android.sh does the copying. Its a dirty compile.
ANDROID_CPU_OBJ = cpu-features.o
endif
###########################################################
##### Embedded #####
###########################################################
# ARM embedded cross-compile configuration.
# See http://www.cryptopp.com/wiki/ARM_Embedded_(Command_Line)
# and http://www.cryptopp.com/wiki/ARM_Embedded_(Bare Metal).
ifeq ($(IS_ARM_EMBEDDED),1)
# CPP, CXX, AR, RANLIB, LD, etc are set in 'setenv-embedded.sh'
CXXFLAGS += $(ARM_EMBEDDED_FLAGS) --sysroot=$(ARM_EMBEDDED_SYSROOT)
endif
###########################################################
##### Compiler and Platform #####
###########################################################
# Wait until CXXFLAGS have been set by setenv scripts.
GCC_COMPILER := $(shell $(CXX) --version 2>/dev/null | $(GREP) -v -E 'llvm|clang' | $(GREP) -i -c -E '(gcc|g\+\+)')
CLANG_COMPILER := $(shell $(CXX) --version 2>/dev/null | $(GREP) -i -c -E 'llvm|clang')
HOSTX := $(shell $(CXX) $(CXXFLAGS) -dumpmachine 2>/dev/null | cut -f 1 -d '-')
ifeq ($(HOSTX),)
HOSTX := $(shell uname -m 2>/dev/null)
endif
# This dance is because Clang reports the host architecture instead
# of the target architecture. Running Clang on an x86_64 machine with
# -arch arm64 yields x86_64 instead of aarch64 or arm64.
ifeq ($(CLANG_COMPILER),1)
IS_X86 := $(shell echo $(CXXFLAGS) | $(GREP) -v 64 | $(GREP) -i -c -E 'i.86')
IS_X64 := $(shell echo $(CXXFLAGS) | $(GREP) -i -c -E 'x86_64|amd64')
IS_ARM32 := $(shell echo $(CXXFLAGS) | $(GREP) -v 64 | $(GREP) -i -c -E 'arm|armhf|arm7l|eabihf')
IS_ARMV8 := $(shell echo $(CXXFLAGS) | $(GREP) -i -c -E 'aarch32|aarch64|arm64|armv8')
else
IS_X86 := $(shell echo $(HOSTX) | $(GREP) -v 64 | $(GREP) -i -c -E 'i.86')
IS_X64 := $(shell echo $(HOSTX) | $(GREP) -i -c -E 'x86_64|amd64')
IS_ARM32 := $(shell echo $(HOSTX) | $(GREP) -v 64 | $(GREP) -i -c -E 'arm|armhf|arm7l|eabihf')
IS_ARMV8 := $(shell echo $(HOSTX) | $(GREP) -i -c -E 'aarch32|aarch64|arm64|armv8')
endif
ifeq ($(IS_ARMV8),1)
IS_ARM32 = 0
endif
IS_X32 := 0
IS_PPC32 := 0
IS_PPC64 := 0
$(info Here's what we found... IS_X86: $(IS_X86), IS_X64: $(IS_X64), IS_ARM32: $(IS_ARM32), IS_ARMV8: $(IS_ARMV8))
###########################################################
##### Test Program #####
###########################################################
# Hack to skip CPU feature tests for some recipes
DETECT_FEATURES ?= 1
ifeq ($(findstring -DCRYPTOPP_DISABLE_ASM,$(CXXFLAGS)),-DCRYPTOPP_DISABLE_ASM)
DETECT_FEATURES := 0
else ifeq ($(findstring clean,$(MAKECMDGOALS)),clean)
DETECT_FEATURES := 0
else ifeq ($(findstring distclean,$(MAKECMDGOALS)),distclean)
DETECT_FEATURES := 0
else ifeq ($(findstring distclean,$(MAKECMDGOALS)),trim)
DETECT_FEATURES := 0
else ifeq ($(IS_IOS),1)
DETECT_FEATURES := 0
endif
# Strip out -Wall, -Wextra and friends for feature testing. FORTIFY_SOURCE is removed
# because it requires -O1 or higher, but we use -O0 to tame the optimizer.
ifeq ($(DETECT_FEATURES),1)
TCXXFLAGS := $(filter-out -D_FORTIFY_SOURCE=% -M -MM -Wall -Wextra -Werror% -Wunused -Wconversion -Wp%, $(CXXFLAGS))
ifneq ($(strip $(TCXXFLAGS)),)
$(info Using testing flags: $(TCXXFLAGS))
endif
#TPROG = TestPrograms/test_cxx.cxx
#$(info Testing compile... )
#$(info $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 1>/dev/null))
endif
# For the previous messages
$(info )
###########################################################
##### X86/X32/X64 Options #####
###########################################################
ifneq ($(IS_X86)$(IS_X64),00)
ifeq ($(DETECT_FEATURES),1)
SSE2_FLAG = -msse2
SSE3_FLAG = -msse3
SSSE3_FLAG = -mssse3
SSE41_FLAG = -msse4.1
SSE42_FLAG = -msse4.2
CLMUL_FLAG = -mpclmul
AESNI_FLAG = -maes
AVX_FLAG = -mavx
AVX2_FLAG = -mavx2
SHANI_FLAG = -msha
TPROG = TestPrograms/test_x86_sse2.cxx
TOPT = $(SSE2_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
CHACHA_FLAG = $(SSE2_FLAG)
else
SSE2_FLAG =
endif
TPROG = TestPrograms/test_x86_ssse3.cxx
TOPT = $(SSSE3_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
ARIA_FLAG = $(SSSE3_FLAG)
CHAM_FLAG = $(SSSE3_FLAG)
LEA_FLAG = $(SSSE3_FLAG)
SIMON128_FLAG = $(SSSE3_FLAG)
SPECK128_FLAG = $(SSSE3_FLAG)
else
SSSE3_FLAG =
endif
TPROG = TestPrograms/test_x86_sse41.cxx
TOPT = $(SSE41_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
BLAKE2B_FLAG = $(SSE41_FLAG)
BLAKE2S_FLAG = $(SSE41_FLAG)
else
SSE41_FLAG =
endif
TPROG = TestPrograms/test_x86_sse42.cxx
TOPT = $(SSE42_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
CRC_FLAG = $(SSE42_FLAG)
else
SSE42_FLAG =
endif
TPROG = TestPrograms/test_x86_clmul.cxx
TOPT = $(CLMUL_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
GCM_FLAG = $(SSSE3_FLAG) $(CLMUL_FLAG)
GF2N_FLAG = $(CLMUL_FLAG)
else
CLMUL_FLAG =
endif
TPROG = TestPrograms/test_x86_aes.cxx
TOPT = $(AESNI_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
AES_FLAG = $(SSE41_FLAG) $(AESNI_FLAG)
SM4_FLAG = $(SSSE3_FLAG) $(AESNI_FLAG)
else
AESNI_FLAG =
endif
TPROG = TestPrograms/test_x86_avx.cxx
TOPT = $(AVX_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
# XXX_FLAG = $(AVX_FLAG)
else
AVX_FLAG =
endif
TPROG = TestPrograms/test_x86_avx2.cxx
TOPT = $(AVX2_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
CHACHA_AVX2_FLAG = $(AVX2_FLAG)
else
AVX2_FLAG =
endif
TPROG = TestPrograms/test_x86_sha.cxx
TOPT = $(SHANI_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
SHA_FLAG = $(SSE42_FLAG) $(SHANI_FLAG)
else
SHANI_FLAG =
endif
ifeq ($(SSE2_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
else ifeq ($(SSE3_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_SSE3
else ifeq ($(SSSE3_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_SSSE3
else ifeq ($(SSE41_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_SSE4
else ifeq ($(SSE42_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_SSE4
endif
ifneq ($(SSE42_FLAG),)
# Unusual GCC/Clang on Macports. It assembles AES, but not CLMUL.
# test_x86_clmul.s:15: no such instruction: 'pclmulqdq $0, %xmm1,%xmm0'
ifeq ($(CLMUL_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_CLMUL
endif
ifeq ($(AESNI_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_AESNI
endif
ifeq ($(AVX_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_AVX
else ifeq ($(AVX2_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_AVX2
else ifeq ($(SHANI_FLAG),)
CXXFLAGS += -DCRYPTOPP_DISABLE_SHANI
endif
endif
# Drop to SSE2 if available
ifeq ($(GCM_FLAG),)
ifneq ($(SSE2_FLAG),)
GCM_FLAG = $(SSE2_FLAG)
endif
endif
# Most Clang cannot handle mixed asm with positional arguments, where the
# body is Intel style with no prefix and the templates are AT&T style.
# Also see https://bugs.llvm.org/show_bug.cgi?id=39895 .
# CRYPTOPP_DISABLE_MIXED_ASM is now being added in config_asm.h for all
# Clang compilers. This test will need to be re-enabled if Clang fixes it.
#TPROG = TestPrograms/test_asm_mixed.cxx
#HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
#ifneq ($(strip $(HAVE_OPT)),0)
# CXXFLAGS += -DCRYPTOPP_DISABLE_MIXED_ASM
#endif
# DETECT_FEATURES
endif
# IS_X86, IS_X32 and IS_X64
endif
###########################################################
##### ARM A-32 and NEON #####
###########################################################
ifneq ($(IS_ARM32),0)
ifeq ($(DETECT_FEATURES),1)
# Android needs -c compile flag for NEON. Otherwise there's an odd linker message.
ifeq ($(IS_ANDROID),1)
NEON_FLAG = -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -mfpu=neon
else
NEON_FLAG = -march=armv7-a -mfloat-abi=$(FP_ABI) -mfpu=neon
endif
# Clang needs an option to include <arm_neon.h>
TPROG = TestPrograms/test_arm_neon_header.cxx
TOPT = $(NEON_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
THEADER += -DCRYPTOPP_ARM_NEON_HEADER=1
endif
TPROG = TestPrograms/test_arm_neon.cxx
TOPT = $(NEON_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(THEADER) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
ARIA_FLAG = $(NEON_FLAG)
AES_FLAG = $(NEON_FLAG)
CRC_FLAG = $(NEON_FLAG)
GCM_FLAG = $(NEON_FLAG)
BLAKE2B_FLAG = $(NEON_FLAG)
BLAKE2S_FLAG = $(NEON_FLAG)
CHACHA_FLAG = $(NEON_FLAG)
CHAM_FLAG = $(NEON_FLAG)
LEA_FLAG = $(NEON_FLAG)
SHA_FLAG = $(NEON_FLAG)
SIMON128_FLAG = $(NEON_FLAG)
SPECK128_FLAG = $(NEON_FLAG)
SM4_FLAG = $(NEON_FLAG)
else
NEON_FLAG =
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
endif
# DETECT_FEATURES
endif
# IS_ARM32
endif
###########################################################
##### Aach32 and Aarch64 #####
###########################################################
ifneq ($(IS_ARMV8),0)
ifeq ($(DETECT_FEATURES),1)
ifeq ($(IS_IOS),1)
ASIMD_FLAG =
CRC_FLAG =
AES_FLAG =
PMUL_FLAG =
SHA_FLAG =
else
ASIMD_FLAG = -march=armv8-a
CRC_FLAG = -march=armv8-a+crc
AES_FLAG = -march=armv8-a+crypto
GCM_FLAG = -march=armv8-a+crypto
GF2N_FLAG = -march=armv8-a+crypto
SHA_FLAG = -march=armv8-a+crypto
endif
TPROG = TestPrograms/test_arm_neon_header.cxx
TOPT =
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
THEADER += -DCRYPTOPP_ARM_NEON_HEADER=1
endif
TPROG = TestPrograms/test_arm_acle_header.cxx
TOPT = $(ASIMD_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
THEADER += -DCRYPTOPP_ARM_ACLE_HEADER=1
endif
TPROG = TestPrograms/test_arm_asimd.cxx
TOPT = $(ASIMD_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(THEADER) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
ARIA_FLAG = $(ASIMD_FLAG)
BLAKE2B_FLAG = $(ASIMD_FLAG)
BLAKE2S_FLAG = $(ASIMD_FLAG)
CHACHA_FLAG = $(ASIMD_FLAG)
CHAM_FLAG = $(ASIMD_FLAG)
LEA_FLAG = $(ASIMD_FLAG)
NEON_FLAG = $(ASIMD_FLAG)
SIMON128_FLAG = $(ASIMD_FLAG)
SPECK128_FLAG = $(ASIMD_FLAG)
SM4_FLAG = $(ASIMD_FLAG)
else
ASIMD_FLAG =
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
endif
TPROG = TestPrograms/test_arm_crc.cxx
TOPT = $(CRC_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(THEADER) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifneq ($(strip $(HAVE_OPT)),0)
CRC_FLAG =
CXXFLAGS += -DCRYPTOPP_DISABLE_ARM_CRC32
endif
TPROG = TestPrograms/test_arm_aes.cxx
TOPT = $(AES_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(THEADER) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifneq ($(strip $(HAVE_OPT)),0)
AES_FLAG =
CXXFLAGS += -DCRYPTOPP_DISABLE_ARM_AES
endif
TPROG = TestPrograms/test_arm_pmull.cxx
TOPT = $(PMULL_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(THEADER) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifneq ($(strip $(HAVE_OPT)),0)
GCM_FLAG =
GF2N_FLAG =
CXXFLAGS += -DCRYPTOPP_DISABLE_ARM_PMULL
endif
TPROG = TestPrograms/test_arm_sha1.cxx
TOPT = $(SHA_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(THEADER) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifneq ($(strip $(HAVE_OPT)),0)
SHA_FLAG =
CXXFLAGS += -DCRYPTOPP_DISABLE_ARM_SHA1
endif
TPROG = TestPrograms/test_arm_sha256.cxx
TOPT = $(SHA_FLAG)
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(THEADER) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifneq ($(strip $(HAVE_OPT)),0)
SHA_FLAG =
CXXFLAGS += -DCRYPTOPP_DISABLE_ARM_SHA2
endif
TPROG = TestPrograms/test_arm_sm3.cxx
TOPT = -march=armv8.4-a+crypto
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(THEADER) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
SM3_FLAG = -march=armv8.4-a+crypto
SM4_FLAG = -march=armv8.4-a+crypto
else
#CXXFLAGS += -DCRYPTOPP_DISABLE_ARM_SM3
#CXXFLAGS += -DCRYPTOPP_DISABLE_ARM_SM4
endif
TPROG = TestPrograms/test_arm_sha3.cxx
TOPT = -march=armv8.4-a+crypto
HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(THEADER) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | wc -w)
ifeq ($(strip $(HAVE_OPT)),0)
SHA3_FLAG = -march=armv8.4-a+crypto
SHA512_FLAG = -march=armv8.4-a+crypto
else
#CXXFLAGS += -DCRYPTOPP_DISABLE_ARM_SHA3
#CXXFLAGS += -DCRYPTOPP_DISABLE_ARM_SM4
endif
# DETECT_FEATURES
endif
# IS_ARMV8
endif
###########################################################
##### Common #####
###########################################################
# No ASM for Travis testing
ifeq ($(findstring no-asm,$(MAKECMDGOALS)),no-asm)
ifeq ($(findstring -DCRYPTOPP_DISABLE_ASM,$(CXXFLAGS)),)
CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
endif # CXXFLAGS
endif # No ASM
# Undefined Behavior Sanitizer (UBsan) testing. Issue 'make ubsan'.
ifeq ($(findstring ubsan,$(MAKECMDGOALS)),ubsan)
ifeq ($(findstring -fsanitize=undefined,$(CXXFLAGS)),)
CXXFLAGS += -fsanitize=undefined
endif # CXXFLAGS
ifeq ($(findstring -DCRYPTOPP_COVERAGE,$(CXXFLAGS)),)
CXXFLAGS += -DCRYPTOPP_COVERAGE
endif # CXXFLAGS
endif # UBsan
# Address Sanitizer (Asan) testing. Issue 'make asan'.
ifeq ($(findstring asan,$(MAKECMDGOALS)),asan)
ifeq ($(findstring -fsanitize=address,$(CXXFLAGS)),)
CXXFLAGS += -fsanitize=address
endif # CXXFLAGS
ifeq ($(findstring -DCRYPTOPP_COVERAGE,$(CXXFLAGS)),)
CXXFLAGS += -DCRYPTOPP_COVERAGE
endif # CXXFLAGS
ifeq ($(findstring -fno-omit-frame-pointer,$(CXXFLAGS)),)
CXXFLAGS += -fno-omit-frame-pointer
endif # CXXFLAGS
endif # Asan
# LD gold linker testing. Triggered by 'LD=ld.gold'.
ifeq ($(findstring ld.gold,$(LD)),ld.gold)
ifeq ($(findstring -fuse-ld=gold,$(CXXFLAGS)),)
ELF_FORMAT := $(shell file `which ld.gold` 2>&1 | cut -d":" -f 2 | $(GREP) -i -c "elf")
ifneq ($(ELF_FORMAT),0)
LDFLAGS += -fuse-ld=gold
endif # ELF/ELF64
endif # CXXFLAGS
endif # Gold
# Valgrind testing. Issue 'make valgrind'.
ifneq ($(filter valgrind,$(MAKECMDGOALS)),)
# Tune flags; see http://valgrind.org/docs/manual/quick-start.html
CXXFLAGS := $(CXXFLAGS:-g%=-g3)
CXXFLAGS := $(CXXFLAGS:-O%=-O1)
CXXFLAGS := $(CXXFLAGS:-xO%=-xO1)
ifeq ($(findstring -DCRYPTOPP_COVERAGE,$(CXXFLAGS)),)
CXXFLAGS += -DCRYPTOPP_COVERAGE
endif # -DCRYPTOPP_COVERAGE
endif # Valgrind
# Debug testing on GNU systems. Triggered by -DDEBUG.
# Newlib test due to http://sourceware.org/bugzilla/show_bug.cgi?id=20268
ifneq ($(filter -DDEBUG -DDEBUG=1,$(CXXFLAGS)),)
USING_GLIBCXX := $(shell $(CXX) $(CXXFLAGS) -E pch.cpp 2>&1 | $(GREP) -i -c "__GLIBCXX__")
ifneq ($(USING_GLIBCXX),0)
ifeq ($(HAS_NEWLIB),0)
ifeq ($(findstring -D_GLIBCXX_DEBUG,$(CXXFLAGS)),)
CXXFLAGS += -D_GLIBCXX_DEBUG
endif # CXXFLAGS
endif # HAS_NEWLIB
endif # USING_GLIBCXX
endif # GNU Debug build
# Dead code stripping. Issue 'make lean'.
ifeq ($(findstring lean,$(MAKECMDGOALS)),lean)
ifeq ($(findstring -ffunction-sections,$(CXXFLAGS)),)
CXXFLAGS += -ffunction-sections
endif # CXXFLAGS
ifeq ($(findstring -fdata-sections,$(CXXFLAGS)),)
CXXFLAGS += -fdata-sections
endif # CXXFLAGS
ifneq ($(IS_IOS),0)
ifeq ($(findstring -Wl,-dead_strip,$(LDFLAGS)),)
LDFLAGS += -Wl,-dead_strip
endif # CXXFLAGS
else # BSD, Linux and Unix
ifeq ($(findstring -Wl,--gc-sections,$(LDFLAGS)),)
LDFLAGS += -Wl,--gc-sections
endif # LDFLAGS
endif # MAKECMDGOALS
endif # Dead code stripping
###########################################################
##### Source and object files #####
###########################################################
# List cryptlib.cpp first, then cpu.cpp, then integer.cpp to tame C++ static initialization problems.
SRCS := cryptlib.cpp cpu.cpp integer.cpp $(filter-out cryptlib.cpp cpu.cpp integer.cpp pch.cpp simple.cpp,$(sort $(wildcard *.cpp)))
# For Makefile.am; resource.h is Windows
INCL := $(filter-out resource.h,$(sort $(wildcard *.h)))
# Cryptogams source files. We couple to ARMv7.
# Limit to Linux. The source files target the GNU assembler.
# Also see https://www.cryptopp.com/wiki/Cryptogams.
ifeq ($(IS_ARM32)$(IS_LINUX),11)
ifeq ($(CLANG_COMPILER),1)
CRYPTOGAMS_ARMV4_FLAG = -march=armv7-a -Wa,--noexecstack
CRYPTOGAMS_ARMV4_THUMB_FLAG = -march=armv7-a -mthumb -Wa,--noexecstack
else
CRYPTOGAMS_ARMV4_FLAG = -march=armv7-a -Wa,--noexecstack
CRYPTOGAMS_ARMV4_THUMB_FLAG = -march=armv7-a -Wa,--noexecstack
endif
SRCS += aes_armv4.S sha1_armv4.S sha256_armv4.S sha512_armv4.S
endif
# Remove unneeded arch specific files to speed build time.
ifeq ($(IS_PPC32)$(IS_PPC64),00)
SRCS := $(filter-out ppc_%,$(SRCS))
endif
ifeq ($(IS_ARM32)$(IS_ARMV8),00)
SRCS := $(filter-out arm_%,$(SRCS))
SRCS := $(filter-out neon_%,$(SRCS))
endif
ifeq ($(IS_X86)$(IS_X32)$(IS_X64),000)
SRCS := $(filter-out sse_%,$(SRCS))
endif
# List cryptlib.cpp first, then cpu.cpp, then integer.cpp to tame C++ static initialization problems.
OBJS := $(SRCS:.cpp=.o)
OBJS := $(OBJS:.S=.o)
# List test.cpp first to tame C++ static initialization problems.
TESTSRCS := adhoc.cpp test.cpp bench1.cpp bench2.cpp bench3.cpp datatest.cpp dlltest.cpp fipsalgt.cpp validat0.cpp validat1.cpp validat2.cpp validat3.cpp validat4.cpp validat5.cpp validat6.cpp validat7.cpp validat8.cpp validat9.cpp validat10.cpp regtest1.cpp regtest2.cpp regtest3.cpp regtest4.cpp
TESTINCL := bench.h factory.h validate.h
# Test objects
TESTOBJS := $(TESTSRCS:.cpp=.o)
LIBOBJS := $(filter-out $(TESTOBJS),$(OBJS))
# For Shared Objects, Diff, Dist/Zip rules
LIB_VER := $(shell $(GREP) "define CRYPTOPP_VERSION" config_ver.h | cut -d" " -f 3)
LIB_MAJOR := $(shell echo $(LIB_VER) | cut -c 1)
LIB_MINOR := $(shell echo $(LIB_VER) | cut -c 2)
LIB_PATCH := $(shell echo $(LIB_VER) | cut -c 3)
ifeq ($(strip $(LIB_PATCH)),)
LIB_PATCH := 0
endif
ifeq ($(HAS_SOLIB_VERSION),1)
# Full version suffix for shared library
SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)
# Different patchlevels and minors are compatible since 6.1
SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR)
SOLIB_FLAGS=-Wl,-soname,libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
endif # HAS_SOLIB_VERSION
###########################################################
##### Targets and Recipes #####
###########################################################
# Default builds program with static library only
.PHONY: default
default: cryptest.exe
.PHONY: all static dynamic
all: static dynamic cryptest.exe
ifneq ($(IS_IOS),0)
static: libcryptopp.a
shared dynamic dylib: libcryptopp.dylib
else
static: libcryptopp.a
shared dynamic: libcryptopp.so$(SOLIB_VERSION_SUFFIX)
endif
.PHONY: test check
test check: cryptest.exe
./cryptest.exe v
# CXXFLAGS are tuned earlier. Applications must use linker flags
# -Wl,--gc-sections (Linux and Unix) or -Wl,-dead_strip (OS X)
.PHONY: lean
lean: static dynamic cryptest.exe
.PHONY: clean
clean:
-$(RM) adhoc.cpp.o adhoc.cpp.proto.o $(LIBOBJS) $(ANDROID_CPU_OBJ) rdrand-*.o $(TESTOBJS) $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS)
@-$(RM) libcryptopp.a libcryptopp.dylib cryptopp.dll libcryptopp.dll.a libcryptopp.import.a
@-$(RM) libcryptopp.so libcryptopp.so$(SOLIB_COMPAT_SUFFIX) libcryptopp.so$(SOLIB_VERSION_SUFFIX)
@-$(RM) cryptest.exe dlltest.exe cryptest.import.exe cryptest.info ct et
@-$(RM) *.la *.lo *.gcov *.gcno *.gcda *.stackdump core core-*
@-$(RM) /tmp/adhoc.exe
@-$(RM) -r /tmp/cryptopp_test/
@-$(RM) -r *.exe.dSYM/
@-$(RM) -r *.dylib.dSYM/
@-$(RM) -r cov-int/
.PHONY: autotools-clean
autotools-clean:
@-$(RM) -f configure.ac configure configure.in Makefile.am Makefile.in Makefile
@-$(RM) -f config.guess config.status config.sub config.h.in compile depcomp
@-$(RM) -f install-sh stamp-h1 ar-lib *.lo *.la *.m4 local.* lt*.sh missing
@-$(RM) -f cryptest cryptestcwd libtool* libcryptopp.la libcryptopp.pc*
@-$(RM) -rf build-aux/ m4/ auto*.cache/ .deps/ .libs/
.PHONY: cmake-clean
cmake-clean:
@-$(RM) -f cryptopp-config.cmake CMakeLists.txt
@-$(RM) -rf cmake_build/
.PHONY: android-clean
android-clean:
@-$(RM) -f $(patsubst %_simd.cpp,%_simd.cpp.neon,$(wildcard *_simd.cpp))
@-$(RM) -rf obj/
.PHONY: distclean
distclean: clean autotools-clean cmake-clean android-clean
-$(RM) adhoc.cpp adhoc.cpp.copied GNUmakefile.deps benchmarks.html cryptest.txt
@-$(RM) cryptest-*.txt cryptopp.tgz libcryptopp.pc *.o *.bc *.ii *~
@-$(RM) -r cryptlib.lib cryptest.exe *.suo *.sdf *.pdb Win32/ x64/ ipch/
@-$(RM) -r $(LIBOBJS:.o=.obj) $(TESTOBJS:.o=.obj)
@-$(RM) -r $(LIBOBJS:.o=.lst) $(TESTOBJS:.o=.lst)
@-$(RM) -r TestCoverage/ ref*/
@-$(RM) cryptopp$(LIB_VER)\.* CryptoPPRef.zip
# Install cryptest.exe, libcryptopp.a and libcryptopp.so.
# The library install was broken-out into its own recipe at GH #653.
.PHONY: install
install: cryptest.exe install-lib
@-$(MKDIR) $(DESTDIR)$(BINDIR)
$(CP) cryptest.exe $(DESTDIR)$(BINDIR)
$(CHMOD) 0755 $(DESTDIR)$(BINDIR)/cryptest.exe
@-$(MKDIR) $(DESTDIR)$(DATADIR)/cryptopp/TestData
@-$(MKDIR) $(DESTDIR)$(DATADIR)/cryptopp/TestVectors
$(CP) TestData/*.dat $(DESTDIR)$(DATADIR)/cryptopp/TestData
$(CHMOD) 0644 $(DESTDIR)$(DATADIR)/cryptopp/TestData/*.dat
$(CP) TestVectors/*.txt $(DESTDIR)$(DATADIR)/cryptopp/TestVectors
$(CHMOD) 0644 $(DESTDIR)$(DATADIR)/cryptopp/TestVectors/*.txt
# A recipe to install only the library, and not cryptest.exe. Also
# see https://github.com/weidai11/cryptopp/issues/653.
.PHONY: install-lib
install-lib:
@-$(MKDIR) $(DESTDIR)$(INCLUDEDIR)/cryptopp
$(CP) *.h $(DESTDIR)$(INCLUDEDIR)/cryptopp
$(CHMOD) 0644 $(DESTDIR)$(INCLUDEDIR)/cryptopp/*.h
ifneq ($(wildcard libcryptopp.a),)
@-$(MKDIR) $(DESTDIR)$(LIBDIR)
$(CP) libcryptopp.a $(DESTDIR)$(LIBDIR)
$(CHMOD) 0644 $(DESTDIR)$(LIBDIR)/libcryptopp.a
endif
ifneq ($(wildcard libcryptopp.dylib),)
@-$(MKDIR) $(DESTDIR)$(LIBDIR)
$(CP) libcryptopp.dylib $(DESTDIR)$(LIBDIR)
$(CHMOD) 0755 $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
-install_name_tool -id $(DESTDIR)$(LIBDIR)/libcryptopp.dylib $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
endif
ifneq ($(wildcard libcryptopp.so$(SOLIB_VERSION_SUFFIX)),)
@-$(MKDIR) $(DESTDIR)$(LIBDIR)
$(CP) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)
$(CHMOD) 0755 $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
ifeq ($(HAS_SOLIB_VERSION),1)
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)/libcryptopp.so
$(LDCONF) $(DESTDIR)$(LIBDIR)
endif
endif
ifneq ($(wildcard libcryptopp.pc),)
@-$(MKDIR) $(DESTDIR)$(LIBDIR)/pkgconfig
$(CP) libcryptopp.pc $(DESTDIR)$(LIBDIR)/pkgconfig
$(CHMOD) 0644 $(DESTDIR)$(LIBDIR)/pkgconfig/libcryptopp.pc
endif
.PHONY: remove uninstall
remove uninstall:
-$(RM) -r $(DESTDIR)$(INCLUDEDIR)/cryptopp
-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.a
-$(RM) $(DESTDIR)$(BINDIR)/cryptest.exe
@-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
@-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
@-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
@-$(RM) $(DESTDIR)$(LIBDIR)/libcryptopp.so
libcryptopp.a: $(LIBOBJS) $(ANDROID_CPU_OBJ)
$(AR) $(ARFLAGS) $@ $(LIBOBJS) $(ANDROID_CPU_OBJ)
$(RANLIB) $@
ifeq ($(HAS_SOLIB_VERSION),1)
.PHONY: libcryptopp.so
libcryptopp.so: libcryptopp.so$(SOLIB_VERSION_SUFFIX)
endif
libcryptopp.so$(SOLIB_VERSION_SUFFIX): $(LIBOBJS) $(ANDROID_CPU_OBJ)
$(CXX) -shared $(SOLIB_FLAGS) -o $@ $(strip $(CXXFLAGS)) -Wl,--exclude-libs,ALL $(LIBOBJS) $(ANDROID_CPU_OBJ) $(LDFLAGS) $(LDLIBS)
ifeq ($(HAS_SOLIB_VERSION),1)
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.so
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
endif
libcryptopp.dylib: $(LIBOBJS)
$(CXX) -dynamiclib -o $@ $(strip $(CXXFLAGS)) -install_name "$@" -current_version "$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)" -compatibility_version "$(LIB_MAJOR).$(LIB_MINOR)" -headerpad_max_install_names $(LDFLAGS) $(LIBOBJS)
cryptest.exe: $(LINK_LIBRARY) $(TESTOBJS)
$(CXX) -o $@ $(strip $(CXXFLAGS)) $(TESTOBJS) $(LINK_LIBRARY_PATH)$(LINK_LIBRARY) $(LDFLAGS) $(LDLIBS)
# Used to generate list of source files for Autotools, CMakeList and Android.mk
.PHONY: sources
sources:
$(info ***** Library sources *****)
$(info $(filter-out $(TESTSRCS),$(SRCS)))
$(info )
$(info ***** Library headers *****)
$(info $(filter-out $(TESTINCL),$(INCL)))
$(info )
$(info ***** Test sources *****)
$(info $(TESTSRCS))
$(info )
$(info ***** Test headers *****)
$(info $(TESTINCL))
adhoc.cpp: adhoc.cpp.proto
ifeq ($(wildcard adhoc.cpp),)
cp adhoc.cpp.proto adhoc.cpp
else
touch adhoc.cpp
endif
# Include dependencies, if present. You must issue `make deps` to create them.
ifeq ($(wildcard GNUmakefile.deps),GNUmakefile.deps)
-include GNUmakefile.deps
endif # Dependencies
# Cryptogams ARM asm implementation. AES needs -mthumb for Clang
aes_armv4.o : aes_armv4.S
$(CXX) $(strip $(CXXFLAGS) $(CRYPTOGAMS_ARMV4_THUMB_FLAG) -c) $<
# Use C++ compiler on C source after patching.
# https://github.com/weidai11/cryptopp/issues/926
cpu-features.o: cpu-features.h cpu-features.c
$(CXX) -x c $(strip $(CXXFLAGS) -c) cpu-features.c
# SSSE3 or NEON available
aria_simd.o : aria_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(ARIA_FLAG) -c) $<
# SSE, NEON or POWER7 available
blake2s_simd.o : blake2s_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(BLAKE2S_FLAG) -c) $<
# SSE, NEON or POWER8 available
blake2b_simd.o : blake2b_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(BLAKE2B_FLAG) -c) $<
# SSE2 or NEON available
chacha_simd.o : chacha_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(CHACHA_FLAG) -c) $<
# AVX2 available
chacha_avx.o : chacha_avx.cpp
$(CXX) $(strip $(CXXFLAGS) $(CHACHA_AVX2_FLAG) -c) $<
# SSSE3 available
cham_simd.o : cham_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(CHAM_FLAG) -c) $<
# Power9 available
darn.o : darn.cpp
$(CXX) $(strip $(CXXFLAGS) $(DARN_FLAG) -c) $<
# SSE2 on i686
donna_sse.o : donna_sse.cpp
$(CXX) $(strip $(CXXFLAGS) $(SSE2_FLAG) -c) $<
# SSE2 on i686
sse_simd.o : sse_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SSE2_FLAG) -c) $<
# SSE4.2 or ARMv8a available
crc_simd.o : crc_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(CRC_FLAG) -c) $<
# PCLMUL or ARMv7a/ARMv8a available
gcm_simd.o : gcm_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(GCM_FLAG) -c) $<
# Carryless multiply
gf2n_simd.o : gf2n_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(GF2N_FLAG) -c) $<
# SSSE3 available
lea_simd.o : lea_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(LEA_FLAG) -c) $<
# NEON available
neon_simd.o : neon_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(NEON_FLAG) -c) $<
# AESNI or ARMv7a/ARMv8a available
rijndael_simd.o : rijndael_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(AES_FLAG) -c) $<
# SSE4.2/SHA-NI or ARMv8a available
sha_simd.o : sha_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SHA_FLAG) -c) $<
# Cryptogams SHA1 asm implementation.
sha1_armv4.o : sha1_armv4.S
$(CXX) $(strip $(CXXFLAGS) $(CRYPTOGAMS_ARMV4_FLAG) -c) $<
# Cryptogams SHA256 asm implementation.
sha256_armv4.o : sha256_armv4.S
$(CXX) $(strip $(CXXFLAGS) $(CRYPTOGAMS_ARMV4_FLAG) -c) $<
# Cryptogams SHA512 asm implementation.
sha512_armv4.o : sha512_armv4.S
$(CXX) $(strip $(CXXFLAGS) $(CRYPTOGAMS_ARMV4_FLAG) -c) $<
# SSE4.2/SHA-NI or ARMv8a available
shacal2_simd.o : shacal2_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SHA_FLAG) -c) $<
# SSSE3, NEON or POWER8 available
simon128_simd.o : simon128_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SIMON128_FLAG) -c) $<
# SSSE3, NEON or POWER8 available
speck128_simd.o : speck128_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SPECK128_FLAG) -c) $<
# ARMv8.4 available
sm3_simd.o : sm3_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SM3_FLAG) -c) $<
# AESNI available
sm4_simd.o : sm4_simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(SM4_FLAG) -c) $<
%.o : %.cpp
$(CXX) $(strip $(CXXFLAGS) -c) $<
.PHONY: dep deps depend
dep deps depend GNUmakefile.deps:
$(CXX) $(strip $(CXXFLAGS)) -MM *.cpp > GNUmakefile.deps
-482
View File
@@ -1,482 +0,0 @@
*** History ***
The History file contains the items that comprise the release notes. The
items in the list below used to be in Readme.txt. Readme.txt now contans the
last several releases.
1.0 - First public release
- Withdrawn at the request of RSA DSI over patent claims
- included Blowfish, BBS, DES, DH, Diamond, DSA, ElGamal, IDEA,
MD5, RC4, RC5, RSA, SHA, WAKE, secret sharing, DEFLATE compression
- had a serious bug in the RSA key generation code.
1.1 - Removed RSA, RC4, RC5
- Disabled calls to RSAREF's non-public functions
- Minor bugs fixed
2.0 - a completely new, faster multiprecision integer class
- added MD5-MAC, HAVAL, 3-WAY, TEA, SAFER, LUC, Rabin, BlumGoldwasser,
elliptic curve algorithms
- added the Lucas strong probable primality test
- ElGamal encryption and signature schemes modified to avoid weaknesses
- Diamond changed to Diamond2 because of key schedule weakness
- fixed bug in WAKE key setup
- SHS class renamed to SHA
- lots of miscellaneous optimizations
2.1 - added Tiger, HMAC, GOST, RIPE-MD160, LUCELG, LUCDIF, XOR-MAC,
OAEP, PSSR, SHARK
- added precomputation to DH, ElGamal, DSA, and elliptic curve algorithms
- added back RC5 and a new RSA
- optimizations in elliptic curves over GF(p)
- changed Rabin to use OAEP and PSSR
- changed many classes to allow copy constructors to work correctly
- improved exception generation and handling
2.2 - added SEAL, CAST-128, Square
- fixed bug in HAVAL (padding problem)
- fixed bug in triple-DES (decryption order was reversed)
- fixed bug in RC5 (couldn't handle key length not a multiple of 4)
- changed HMAC to conform to RFC-2104 (which is not compatible
with the original HMAC)
- changed secret sharing and information dispersal to use GF(2^32)
instead of GF(65521)
- removed zero knowledge prover/verifier for graph isomorphism
- removed several utility classes in favor of the C++ standard library
2.3 - ported to EGCS
- fixed incomplete workaround of min/max conflict in MSVC
3.0 - placed all names into the "CryptoPP" namespace
- added MD2, RC2, RC6, MARS, RW, DH2, MQV, ECDHC, CBC-CTS
- added abstract base classes PK_SimpleKeyAgreementDomain and
PK_AuthenticatedKeyAgreementDomain
- changed DH and LUCDIF to implement the PK_SimpleKeyAgreementDomain
interface and to perform domain parameter and key validation
- changed interfaces of PK_Signer and PK_Verifier to sign and verify
messages instead of message digests
- changed OAEP to conform to PKCS#1 v2.0
- changed benchmark code to produce HTML tables as output
- changed PSSR to track IEEE P1363a
- renamed ElGamalSignature to NR and changed it to track IEEE P1363
- renamed ECKEP to ECMQVC and changed it to track IEEE P1363
- renamed several other classes for clarity
- removed support for calling RSAREF
- removed option to compile old SHA (SHA-0)
- removed option not to throw exceptions
3.1 - added ARC4, Rijndael, Twofish, Serpent, CBC-MAC, DMAC
- added interface for querying supported key lengths of symmetric ciphers
and MACs
- added sample code for RSA signature and verification
- changed CBC-CTS to be compatible with RFC 2040
- updated SEAL to version 3.0 of the cipher specification
- optimized multiprecision squaring and elliptic curves over GF(p)
- fixed bug in MARS key setup
- fixed bug with attaching objects to Deflator
3.2 - added DES-XEX3, ECDSA, DefaultEncryptorWithMAC
- renamed DES-EDE to DES-EDE2 and TripleDES to DES-EDE3
- optimized ARC4
- generalized DSA to allow keys longer than 1024 bits
- fixed bugs in GF2N and ModularArithmetic that can cause calculation errors
- fixed crashing bug in Inflator when given invalid inputs
- fixed endian bug in Serpent
- fixed padding bug in Tiger
4.0 - added Skipjack, CAST-256, Panama, SHA-2 (SHA-256, SHA-384, and SHA-512),
and XTR-DH
- added a faster variant of Rabin's Information Dispersal Algorithm (IDA)
- added class wrappers for these operating system features:
* high resolution timers on Windows, Unix, and MacOS
* Berkeley and Windows style sockets
* Windows named pipes
* /dev/random and /dev/urandom on Linux and FreeBSD
* Microsoft's CryptGenRandom on Windows
- added support for SEC 1 elliptic curve key format and compressed points
- added support for X.509 public key format (subjectPublicKeyInfo) for
RSA, DSA, and elliptic curve schemes
- added support for DER and OpenPGP signature format for DSA
- added support for ZLIB compressed data format (RFC 1950)
- changed elliptic curve encryption to use ECIES (as defined in SEC 1)
- changed MARS key schedule to reflect the latest specification
- changed BufferedTransformation interface to support multiple channels
and messages
- changed CAST and SHA-1 implementations to use public domain source code
- fixed bug in StringSource
- optmized multi-precision integer code for better performance
4.1 - added more support for the recommended elliptic curve parameters in SEC 2
- added Panama MAC, MARC4
- added IV stealing feature to CTS mode
- added support for PKCS #8 private key format for RSA, DSA, and elliptic
curve schemes
- changed Deflate, MD5, Rijndael, and Twofish to use public domain code
- fixed a bug with flushing compressed streams
- fixed a bug with decompressing stored blocks
- fixed a bug with EC point decompression using non-trinomial basis
- fixed a bug in NetworkSource::GeneralPump()
- fixed a performance issue with EC over GF(p) decryption
- fixed syntax to allow GCC to compile without -fpermissive
- relaxed some restrictions in the license
4.2 - added support for longer HMAC keys
- added MD4 (which is not secure so use for compatibility purposes only)
- added compatibility fixes/workarounds for STLport 4.5, GCC 3.0.2,
and MSVC 7.0
- changed MD2 to use public domain code
- fixed a bug with decompressing multiple messages with the same object
- fixed a bug in CBC-MAC with MACing multiple messages with the same object
- fixed a bug in RC5 and RC6 with zero-length keys
- fixed a bug in Adler32 where incorrect checksum may be generated
5.0 - added ESIGN, DLIES, WAKE-OFB, PBKDF1 and PBKDF2 from PKCS #5
- added key validation for encryption and signature public/private keys
- renamed StreamCipher interface to SymmetricCipher, which is now implemented
by both stream ciphers and block cipher modes including ECB and CBC
- added keying interfaces to support resetting of keys and IVs without
having to destroy and recreate objects
- changed filter interface to support non-blocking input/output
- changed SocketSource and SocketSink to use overlapped I/O on Microsoft Windows
- grouped related classes inside structs to help templates, for example
AESEncryption and AESDecryption are now AES::Encryption and AES::Decryption
- where possible, typedefs have been added to improve backwards
compatibility when the CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY macro is defined
- changed Serpent, HAVAL and IDEA to use public domain code
- implemented SSE2 optimizations for Integer operations
- fixed a bug in HMAC::TruncatedFinal()
- fixed SKIPJACK byte ordering following NIST clarification dated 5/9/02
5.01 - added known answer test for X9.17 RNG in FIPS 140 power-up self test
- submitted to NIST/CSE, but not publicly released
5.02 - changed EDC test to MAC integrity check using HMAC/SHA1
- improved performance of integrity check
- added blinding to defend against RSA timing attack
5.03 - created DLL version of Crypto++ for FIPS 140-2 validation
- fixed vulnerabilities in GetNextIV for CTR and OFB modes
5.0.4 - Removed DES, SHA-256, SHA-384, SHA-512 from DLL
5.1 - added PSS padding and changed PSSR to track IEEE P1363a draft standard
- added blinding for RSA and Rabin to defend against timing attacks
on decryption operations
- changed signing and decryption APIs to support the above
- changed WaitObjectContainer to allow waiting for more than 64
objects at a time on Win32 platforms
- fixed a bug in CBC and ECB modes with processing non-aligned data
- fixed standard conformance bugs in DLIES (DHAES mode) and RW/EMSA2
signature scheme (these fixes are not backwards compatible)
- fixed a number of compiler warnings, minor bugs, and portability problems
- removed Sapphire
5.2 - merged in changes for 5.01 - 5.0.4
- added support for using encoding parameters and key derivation parameters
with public key encryption (implemented by OAEP and DL/ECIES)
- added Camellia, SHACAL-2, Two-Track-MAC, Whirlpool, RIPEMD-320,
RIPEMD-128, RIPEMD-256, Base-32 coding, FIPS variant of CFB mode
- added ThreadUserTimer for timing thread CPU usage
- added option for password-based key derivation functions
to iterate until a mimimum elapsed thread CPU time is reached
- added option (on by default) for DEFLATE compression to detect
uncompressible files and process them more quickly
- improved compatibility and performance on 64-bit platforms,
including Alpha, IA-64, x86-64, PPC64, Sparc64, and MIPS64
- fixed ONE_AND_ZEROS_PADDING to use 0x80 instead 0x01 as padding.
- fixed encoding/decoding of PKCS #8 privateKeyInfo to properly
handle optional attributes
5.2.1 - fixed bug in the "dlltest" DLL testing program
- fixed compiling with STLport using VC .NET
- fixed compiling with -fPIC using GCC
- fixed compiling with -msse2 on systems without memalign()
- fixed inability to instantiate PanamaMAC
- fixed problems with inline documentation
5.2.2 - added SHA-224
- put SHA-256, SHA-384, SHA-512, RSASSA-PSS into DLL
5.2.3 - fixed issues with FIPS algorithm test vectors
- put RSASSA-ISO into DLL
5.3 - ported to MSVC 2005 with support for x86-64
- added defense against AES timing attacks, and more AES test vectors
- changed StaticAlgorithmName() of Rijndael to "AES", CTR to "CTR"
5.4 - added Salsa20
- updated Whirlpool to version 3.0
- ported to GCC 4.1, Sun C++ 5.8, and Borland C++Builder 2006
5.5 - added VMAC and Sosemanuk (with x86-64 and SSE2 assembly)
- improved speed of integer arithmetic, AES, SHA-512, Tiger, Salsa20,
Whirlpool, and PANAMA cipher using assembly (x86-64, MMX, SSE2)
- optimized Camellia and added defense against timing attacks
- updated benchmarks code to show cycles per byte and to time key/IV setup
- started using OpenMP for increased multi-core speed
- enabled GCC optimization flags by default in GNUmakefile
- added blinding and computational error checking for RW signing
- changed RandomPool, X917RNG, GetNextIV, DSA/NR/ECDSA/ECNR to reduce
the risk of reusing random numbers and IVs after virtual machine state
rollback
- changed default FIPS mode RNG from AutoSeededX917RNG<DES_EDE3> to
AutoSeededX917RNG<AES>
- fixed PANAMA cipher interface to accept 256-bit key and 256-bit IV
- moved MD2, MD4, MD5, PanamaHash, ARC4, WAKE_CFB into the namespace "Weak"
- removed HAVAL, MD5-MAC, XMAC
5.5.1 - fixed VMAC validation failure on 32-bit big-endian machines
5.5.2 - ported x64 assembly language code for AES, Salsa20, Sosemanuk, and Panama
to MSVC 2005 (using MASM since MSVC doesn't support inline assembly on x64)
- fixed Salsa20 initialization crash on non-SSE2 machines
- fixed Whirlpool crash on Pentium 2 machines
- fixed possible branch prediction analysis (BPA) vulnerability in
MontgomeryReduce(), which may affect security of RSA, RW, LUC
- fixed link error with MSVC 2003 when using "debug DLL" form of runtime library
- fixed crash in SSE2_Add on P4 machines when compiled with
MSVC 6.0 SP5 with Processor Pack
- ported to MSVC 2008, GCC 4.2, Sun CC 5.9, Intel C++ Compiler 10.0,
and Borland C++Builder 2007
5.6.0 - added AuthenticatedSymmetricCipher interface class and Filter wrappers
- added CCM, GCM (with SSE2 assembly), EAX, CMAC, XSalsa20, and SEED
- added support for variable length IVs
- added OIDs for Brainpool elliptic curve parameters
- improved AES and SHA-256 speed on x86 and x64
- changed BlockTransformation interface to no longer assume data alignment
- fixed incorrect VMAC computation on message lengths
that are >64 mod 128 (x86 assembly version is not affected)
- fixed compiler error in vmac.cpp on x86 with GCC -fPIC
- fixed run-time validation error on x86-64 with GCC 4.3.2 -O2
- fixed HashFilter bug when putMessage=true
- fixed AES-CTR data alignment bug that causes incorrect encryption on ARM
- removed WORD64_AVAILABLE; compiler support for 64-bit int is now required
- ported to GCC 4.3, C++Builder 2009, Sun CC 5.10, Intel C++ Compiler 11
5.6.1 - added support for AES-NI and CLMUL instruction sets in AES and GMAC/GCM
- removed WAKE-CFB
- fixed several bugs in the SHA-256 x86/x64 assembly code:
* incorrect hash on non-SSE2 x86 machines on non-aligned input
* incorrect hash on x86 machines when input crosses 0x80000000
* incorrect hash on x64 when compiled with GCC with optimizations enabled
- fixed bugs in AES x86 and x64 assembly causing crashes in some MSVC build configurations
- switched to a public domain implementation of MARS
- ported to MSVC 2010, GCC 4.5.1, Sun Studio 12u1, C++Builder 2010, Intel C++ Compiler 11.1
- renamed the MSVC DLL project to "cryptopp" for compatibility with MSVC 2010
5.6.2 - changed license to Boost Software License 1.0
- added SHA-3 (Keccak)
- updated DSA to FIPS 186-3 (see DSA2 class)
- fixed Blowfish minimum keylength to be 4 bytes (32 bits)
- fixed Salsa validation failure when compiling with GCC 4.6
- fixed infinite recursion when on x64, assembly disabled, and no AESNI
- ported to MSVC 2012, GCC 4.7, Clang 3.2, Solaris Studio 12.3, Intel C++ Compiler 13.0
5.6.3 - maintenance release, honored API/ABI/Versioning requirements
- expanded processes to include community and its input
* 12 unique contributors for this release
- fixed CVE-2015-2141
- cleared most Undefined Behavior Sanitizer (UBsan) findings
- cleared all Address Sanitizer (Asan) findings
- cleared all Valgrind findings
- cleared all Coverity findings
- cleared all Enterprise Analysis (/analyze) findings
- cleared most GCC warnings with -Wall
- cleared most Clang warnings with -Wall
- cleared most MSVC warnings with /W4
- added -fPIC 64-bit builds. Off by default for i386
- added HKDF class from RFC 5868
- switched to member_ptr due to C++ 11 warnings for auto_ptr
- initialization of C++ static objects, off by default
* GCC and init_priotirty/constructor attributes
* MSVC and init_seg(lib)
* CRYPTOPP_INIT_PRIORITY disabled by default, but available
- improved OS X support
- improved GNUmakefile support for Testing and QA
- added self tests for additional Testing and QA
- added cryptest.sh for systematic Testing and QA
- added GNU Gold linker support
- added Visual Studio 2010 solution and project files in vs2010.zip
- added Clang integrated assembler support
- unconditionally define CRYPTOPP_NO_UNALIGNED_DATA_ACCESS for Makefile
target 'ubsan' and at -O3 due to GCC vectorization on x86 and x86_64
- workaround ARMEL/GCC 5.2 bug and failed self test
- fixed crash in MQV due to GCC 4.9+ and inlining
- fixed hang in SHA due to GCC 4.9+ and inlining
- fixed missing rdtables::Te under VS with ALIGNED_DATA_ACCESS
- fixed S/390 and big endian feature detection
- fixed S/390 and int128_t/uint128_t detection
- fixed X32 (ILP32) feature detection
- removed _CRT_SECURE_NO_DEPRECATE for Microsoft platforms
- utilized bound checking interfaces from ISO/IEC TR 24772 when available
- improved ARM, ARM64, MIPS, MIPS64, S/390 and X32 (ILP32) support
- introduced CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
- added additional Doxygen-based documentation
- ported to MSVC 2015, Xcode 7.2, GCC 5.2, Clang 3.7, Intel C++ 16.00
5.6.4 - September 11, 2016
- maintenance release, honored API/ABI/Versioning requirements
- expanded community input and support
* 22 unique contributors for this release
- fixed CVE-2016-3995
- changed SHA3 to FIPS 202 (F1600, XOF d=0x06)
- added Keccak (F1600, XOF d=0x01)
- added ChaCha (ChaCha8/12/20)
- added HMQV and FHMQV
* Hashed and Fully Hashed MQV
- added BLAKE2 (BLAKE2s and BLAKE2b)
* C++, SSE2, SSE4, ARM NEON and ARMv8 ASIMD
- added CRC32-C
* C/C++, Amd64 CRC, and ARMv8 CRC
- improved Rabin-William signatures
* Tweaked roots <em>e</em> and <em>f</em>
- improved C++11 support
* atomics, threads and fences
* alginof, alignas
* constexpr
* noexcept
- improved GCM mode
* ARM NEON and ARMv8 ASIMD
* ARMv8 carry-less multiply
- improved Windows 8 and 10 support
* Windows Phone, Universal Windows Platform, Windows Store
- improved MIPS, ARMv7 and ARMv8 support
* added scripts setenv-{android|embedded|ios}.sh for GNUmakefile-cross
* aggressive use of -march=<arch> and -mfpu=<fpu> in cryptest.sh
- improved build systems
* Visual Studio 2010 default
* added CMake support (lacks FindCryptopp.cmake)
* archived VC++ 5/0/6.0 project files (vc60.zip)
* archived VS2005 project files (vs2005.zip)
* archived Borland project files (bds10.zip)
- improved Testing and QA
* expanded platforms and compilers
* added code generation tests based on CPU features
* added C++03, C++11, C++14, C++17 testing
* added -O3, -O5, -Ofast and -Os testing
- ported to MSVC 2015 SP3, Xcode 9.0, Sun Studio 12.5, GCC 7.0,
MacPorts GCC 7.0, Clang 3.8, Intel C++ 17.00
5.6.5 - October 11, 2016
- maintenance release, recompile of programs recommended
- expanded community input and support
* 25 unique contributors as of this release
- fixed CVE-2016-7420 (Issue 277, document NDEBUG for production/release)
- fixed CVE-2016-7544 (Issue 302, avoid _malloca and _freea)
- shipped library in recommended state
* backwards compatibility achieved with <config.compat>
- Visual Studio project file cleanup
* improved X86 and X64 MSBuild support
* added ARM-based MSBuild awareness
- improved Testing and QA
* expanded platforms and compilers
* expanded Coverity into OS X and Windows platforms
* added Windows test scripts using Strawberry Perl
- ported to MSVC 2015 SP3, Xcode 7.3, Sun Studio 12.5, GCC 7.0,
MacPorts GCC 7.0, Clang 3.8, Intel C++ 17.00
6.0.0 - January 22, 2018
- Major release, recompile of programs required
- expanded community input and support
* 43 unique contributors as of this release
- fixed CVE-2016-9939 (Issue 346, transient DoS)
- fixed CVE-2017-9434 (Issue 414, misidentified memory error)
- converted to BASE+SIMD implementation
* BASE provides an architecture neutral C++ implementation
* SIMD provides architecture specific hardware acceleration
- improved PowerPC Power4, Power7 and Power8 support
- added ARIA, EC German DSA, Deterministic signatures (RFC 6979),
Kalyna, NIST Hash and HMAC DRBG, Padlock RNG, Poly1305, SipHash,
Simon, Speck, SM3, SM4, Threefish algorithms
- added NaCl interface from the compact library
* x25519 key exhange and ed25519 signing provided through NaCl interface
- improved Testing and QA
- ported to MSVC 2017, Xcode 8.1, Sun Studio 12.5, GCC 7.0,
MacPorts GCC 7.0, Clang 4.0, Intel C++ 17.00, IBM XL C/C++ 13.1
6.1.0 - February 22, 2018
- minor release, maintenance items
- expanded community input and support
* 46 unique contributors as of this release
- use 2048-bit modulus default for DSA
- fix build under Linuxbrew
- use /bin/sh in GNUmakefile
- fix missing flags for SIMON and SPECK in GNUMakefile-cross
- fix ARM and MinGW misdetection
- port setenv-android.sh to latest NDK
- fix Clang check for C++11 lambdas
- Simon and Speck to little-endian implementation
- use LIB_MAJOR for ABI compatibility
- fix ODR violation in AdvancedProcessBlocks_{ARCH} templates
- handle C++17 std::uncaught_exceptions
- ported to MSVC 2017, Xcode 8.1, Sun Studio 12.5, GCC 8.0.1,
MacPorts GCC 7.0, Clang 4.0, Intel C++ 17.00, IBM XL C/C++ 13.1
7.0.0 - April 8, 2018
- major release, recompile of programs required
- expanded community input and support
* 48 unique contributors as of this release
- fix incorrect result when using Integer::ModInverse
* may be CVE worthy, but request was not submitted
- fix ARIA/CTR bus error on Sparc64
- fix incorrect result when using a_exp_b_mod_c
- fix undeclared identifier uint32_t on early Visual Studio
- fix iPhoneSimulator build on i386
- fix incorrect adler32 in ZlibDecompressor
- fix Power7 test using PPC_FEATURE_ARCH_2_06
- workaround incorrect Glibc sysconf return value on ppc64-le
- add KeyDerivationFunction interface
- add scrypt key derivation function
- add Salsa20_Core transform callable from outside class
- add sbyte, sword16, sword32 and sword64
- remove s_nullNameValuePairs from unnamed namespace
- ported to MSVC 2017, Xcode 9.3, Sun Studio 12.5, GCC 8.0.1,
MacPorts GCC 7.0, Clang 4.0, Intel C++ 17.00, IBM XL C/C++ 13.1
8.0.0 - December 28, 2018
- major release, recompile of programs required
- expanded community input and support
* 54 unique contributors as of this release
- add x25519 key exchange and ed25519 signature scheme
- add limited Asymmetric Key Package support from RFC 5958
- add Power9 DARN random number generator support
- add CHAM, HC-128, HC-256, Hight, LEA, Rabbit, Simeck
- fix FixedSizeAllocatorWithCleanup may be unaligned on some platforms
- cutover to GNU Make-based cpu feature tests
- rename files with dashes to underscores
- fix LegacyDecryptor and LegacyDecryptorWithMAC use wrong MAC
- fix incorrect AES/CBC decryption on Windows
- avoid Singleton<T> when possible, avoid std::call_once completely
- fix SPARC alignment problems due to GetAlignmentOf<T>() on word64
- add ARM AES asm implementation from Cryptogams
- remove CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS support
8.1.0 - February 22, 2019
- minor release, no recompile of programs required
- expanded community input and support
* 56 unique contributors as of this release
- fix OS X PowerPC builds with Clang
- add Microsoft ARM64 support
- fix iPhone Simulator build due to missing symbols
- add CRYPTOPP_BUGGY_SIMD_LOAD_AND_STORE
- add carryless multiplies for NIST b233 and k233 curves
- fix OpenMP build due to use of OpenMP 4 with down-level compilers
- add SignStream and VerifyStream for ed25519 and large files
- fix missing AlgorithmProvider in PanamaHash
- add SHAKE-128 and SHAKE-256
- fix AVX2 build due to _mm256_broadcastsi128_si256
- add IETF ChaCha, XChaCha, ChaChaPoly1305 and XChaChaPoly1305
8.2.0 - April 28, 2019
- minor release, no recompile of programs required
- expanded community input and support
* 56 unique contributors as of this release
- use PowerPC unaligned loads and stores with Power8
- add SKIPJACK test vectors
- fix SHAKE-128 and SHAKE-256 compile
- removed IS_NEON from Makefile
- fix Aarch64 build on Fedora 29
- fix missing GF2NT_233_Multiply_Reduce_CLMUL in FIPS DLL
- add missing BLAKE2 constructors
- fix missing BlockSize() in BLAKE2 classes
-222
View File
@@ -1,222 +0,0 @@
CONTENTS OF THIS FILE
---------------------
* Introduction
* Building the Library
* Alternate Build Systems
* Installing the Library
* Makefile Targets
* Dynamic Analysis
* Acceptance Testing
* Reporting problems
INTRODUCTION
------------
Crypto++ Library is a free C++ class library of cryptographic algorithms and schemes. The library was originally written and placed in public domain by Wei Dai, but it is now maintained by the community. The library homepage is at http://www.cryptopp.com/. The latest library source code can be found at http://github.com/weidai11/cryptopp. For licensing and copyright information, please see License.txt.
These are general instructions for the AIX, BSDs, Linux, OS X, Solaris and Unix. The library uses a GNU makefile, which combines configuration and a non-anemic make. On AIX, BSD and Solaris you will likely have to use `gmake` to build the library. On Linux, OS X and Unix, the system's make should be OK. On Windows, Crypto++ provides Visual Studio solutions.
You should look through the GNUmakefile and config.h to ensure settings look reasonable before building. There are two wiki pages that help explain them at http://www.cryptopp.com/wiki/GNUmakefile and http://www.cryptopp.com/wiki/Config.h.
Wiki pages are available for some platforms with specific build instructions. The pages include Android, ARM, iOS, MSBuild and Solaris. Solaris users should visit the wiki for important information on compiling the library with different versions of SunCC and options, and information on improving library performance and features.
Crypto++ does not depend upon other tools or libraries. It does not use Autotools, does not use CMake, and does not use Boost. If you use an alternate build system, like Autotools or CMake, then see the warning below about CXXFLAGS and lack of -DNDEBUG. CMake is available in Master as a matter of convenience, but its not officially supported.
There is a partially complete CmakeList.txt available on the wiki at http://www.cryptopp.com/wiki/CMake. It is not recommended for use because it is not in a good state. If you have CMake expertise and can work some problems, then please see the wiki page for tasks related to CMake.
BUILDING THE LIBRARY
--------------------
In general, all you should have to do is open a terminal, and then:
make
make test
sudo make install
The command above builds the static library and cryptest.exe program. It also uses a sane set of default flags, which are usually "-DNDEBUG -g2 -O3 -fPIC".
If you want to build the shared object, then issue:
make static dynamic cryptest.exe
Or:
make libcryptopp.a libcryptopp.so cryptest.exe
If you would like to use a different compiler, the set CXX:
export CXX=/opt/intel/bin/icpc
make
Or:
CXX=/opt/solarisstudio12.4/bin/CC make
If you want to build using C++11, then:
export CXXFLAGS="-DNDEBUG -g2 -O3 -std=c++11"
make
Or:
CXXFLAGS="-DNDEBUG -g2 -O3 -std=c++11" make
LLVM's libc++ is also supported, so you can:
export CXXFLAGS="-std=c++11 -stdlib=libc++"
make
If you target 32-bit IA-32 machines (i386, i586 or i686), then the makefile forgoes -fPIC due to register pressures. You should add -fPIC yourself in this case:
CXXFLAGS="-DNDEBUG -g2 -O3 -fPIC" make
You can also override a variable so that only your flags are present. That is, the makefile will not add additional flags. For example, the following builds with only -std=c++11:
make CXXFLAGS="-std=c++11"
Crypto++ does not enagage Specter remediations at this time. You can build with Specter resistance with the following flags:
CXXFLAGS="-DNDEBUG -g2 -O3 -mfunction-return=thunk -mindirect-branch=thunk" make
BUILDING WITH VCPKG
-------------------
You can download and install cryptopp using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install cryptopp
The cryptopp port in vcpkg is kept up to date by Microsoft team members and community contributors.
If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
ALTERNATE BUILD SYSTEMS
-----------------------
The Crypto++ library is Make based and uses GNU Make by default. The makefile uses '-DNDEBUG -g2 -O2' CXXFLAGS by default. If you use an alternate build system, like Autotools or CMake, then ensure the build system includes '-DNDEBUG' for production or release builds. The Crypto++ library uses asserts for debugging and diagnostics during development; it does not rely on them to crash a program at runtime.
If an assert triggers in production software, then unprotected sensitive information could be written to the filesystem and could be egressed to the platform's error reporting program, like Apport on Ubuntu, CrashReporter on Apple and Windows Error Reporting on Microsoft OSes.
The makefile orders object files to help remediate problems associated with C++ static initialization order. The library does not use custom linker scripts. If you use an alternate build system, like Autotools or CMake, and collect source files into a list, then ensure these three are at the head of the list: 'cryptlib.cpp cpu.cpp integer.cpp <other sources>'. They should be linked in the same order: 'cryptlib.o cpu.o integer.o <other objects>'.
If your linker supports initialization attributes, like init_priority, then you can define CRYPTOPP_INIT_PRIORITY to control object initialization order. Set it to a value like 250. User programs can use CRYPTOPP_USER_PRIORITY to avoid conflicts with library values. Initialization attributes are more reliable than object file ordering, but its not ubiquitously supported by linkers.
The makefile links to the static version of the Crypto++ library to avoid missing dynamic libraries, incorrect dynamic libraries, binary planting and other LD_PRELOAD tricks. You should use the static version of the library in your programs to help avoid unwanted redirections.
INSTALLING THE LIBRARY
----------------------
To install the library into a user selected directory, perform:
make install PREFIX=/usr/local
If you are going to run `make install PREFIX=/usr/local`, then you should build with '-DCRYPTOPP_DATA_DIR='\"$PREFIX/share/cryptopp/\"' to ensure cryptest.exe can locate the test data files and test vectors after installation. The trailing slash in the path is needed because simple preprocessor concatenation is used.
During install, the makefile copies cryptest.exe into $PREFIX/bin, copies headers into $PREFIX/include/cryptopp, and copies libraries into $PREFIX/lib. If you only built a static or dynamic version of the library, then only one library is copied. The install recipe does not fail if the static library or shared object is not built.
PREFIX is non-standard, but its retained for historical purposes. The makefile also responds to `prefix=<path>`.
MAKEFILE TARGETS
----------------
The following are some of the targets provided by the GNU makefile.
`make` invokes the default rule, which builds the Crypto++ static library and test harness. They are called `libcryptopp.a` and `cryptest.exe`, respectively. `cryptest.exe` links against `libcryptopp.a`, so the static library is a prerequisite for the target.
`make libcryptopp.a` and `make static` build the static version of the library.
`make libcryptopp.so` and `make dynamic` build the dynamic version of the library. On Mac OS X, the recipe builds `libcryptopp.dylib` instead.
`make cryptest.exe` builds the library test harness.
`make test` and `make check` are the same recipe and invoke the test harness with the the validation option. That is, it executes `cryptest.exe v`.
`make install` installs the library. By default, the makefile copies into `/usr/local` by default.
`make clean` cleans most transient and temporary objects.
`make disclean` cleans most objects that are not part of the original distribution.
`make dist` and `make zip` builds ZIP file that is suitable for distribution.
`make iso` builds an ISO on Linux or OS X that is suitable for alternate distribution.
`make ubsan` and `make asan` builds the library with the respective sanitizer.
DYNAMIC ANALYSIS
----------------
The Crypto++ embraces tools like Undefined Behavior sanitizer (UBsan), Address sanitizer (Asan), Bounds sanitizer (Bsan), Coverity Scan and Valgrind. Both Clang 3.2 and above and GCC 4.8 and above provide sanitizers. Please check with your distribution on how to install the compiler with its sanitizer libraries (they are sometimes a separate install item).
UBsan and Asan are mutually exclusive options, so you can perform only one of these at a time:
make ubsan
./cryptest.exe v 2>&1 | egrep "(error|FAILED)"
./cryptest.exe tv all 2>&1 | egrep "(error|FAILED)"
Or:
make asan
./cryptest.exe v 2>&1 | egrep "(error|FAILED)"
./cryptest.exe tv all 2>&1 | egrep "(error|FAILED)"
If you experience self test failures or see reports of undefined behavior, then you should ensure CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is defined in config.h. CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is not defined due to historical purposes.
If you experience failures under Asan, then gather more information with:
./cryptest.exe v 2>&1 | asan_symbolize
If you moved Crypto++ such that the paths have changed, then perform:
./cryptest.exe v 2>&1 | sed "s/<old path>/<new path>/g" | asan_symbolize
ACCEPTANCE TESTING
------------------
Crypto++ uses five security gates in its engineering process. The library must maintain the quality provided by the review system and integrity of the test suites. You can use the information to decide if the Crypto++ library suits your needs and provides a compatible security posture.
The first gate is code review and discussion of proposed chnages. Git commits often cross reference a User Group discussions.
Second is the compiler warning system. The code must clean compile under the equivalent of GCC's -Wall -Wextra (modulo -Wno-type-limits -Wno-unknown-pragmas). This is a moving target as compiler analysis improves.
Third, the code must pass cleanly though GCC and Clang's Undefined Behavior sanitizer (UBsan), Address sanitizer (Asan) and Bounds sanitizer (Bsan). See DYNAMIC ANALYSIS above on how to execute them.
Fourth, the code must pass cleanly though Coverity Scan and Valgrind. Valgrind testing is performed at -O1 in accordance with Valgrind recommendations.
Fifth, the test harness provides a "validation" option which performs basic system checks (like endianness and word sizes) and exercises algorithms (like AES and SHA). You run the validation suite as shown below. The tail of the output should indicate 0 failed tests.
./cryptest.exe v
...
All tests passed!
Test ended at Sun Jul 26 02:10:57 2015
Seed used was: 1437891055
Sixth, the test harness provides a "test vector" option which uses many known test vectors, even those published by other people (like Brian Gladman for AES). You run the test vectors as shown below. The tail of the output should indicate 0 failed tests.
./cryptest.exe tv all
...
Testing SymmetricCipher algorithm MARS/ECB.
.................
Tests complete. Total tests = 4094. Failed tests = 0.
The library also offers its test script for those who want to use it. The test script is names cryptest.sh, and it repeatedly builds the library and exectues the tests under various configurations. It takes 2 to 4 hours to run on a semi-modern desktop or server; and days to run on an IoT gadget. Also see http://github.com/weidai11/cryptopp/blob/master/cryptest.sh and http://cryptopp.com/wiki/Cryptest.sh.
REPORTING PROBLEMS
------------------
Dirty compiles and failures in the validation suite or test vectors should be reported at the Crypto++ User Group. The User Group is located at http://groups.google.com/forum/#!forum/cryptopp-users.
The library uses Wei Dai's GitHub to track issues. The tracker is located at http://github.com/weidai11/cryptopp/issues. Please do not ask questions in the bug tracker; ask questions on the mailing list instead. Also see http://www.cryptopp.com/wiki/Bug_Report.
+32 -53
View File
@@ -1,4 +1,4 @@
Compilation Copyright (c) 1995-2019 by Wei Dai. All rights reserved. Compilation Copyright (c) 1995-2010 by Wei Dai. All rights reserved.
This copyright applies only to this software distribution package This copyright applies only to this software distribution package
as a compilation, and does not imply a copyright on any particular as a compilation, and does not imply a copyright on any particular
file in the package. file in the package.
@@ -21,63 +21,42 @@ Paulo Baretto - rijndael.cpp, skipjack.cpp, square.cpp
Richard De Moliner - safer.cpp Richard De Moliner - safer.cpp
Matthew Skala - twofish.cpp Matthew Skala - twofish.cpp
Kevin Springle - camellia.cpp, shacal2.cpp, ttmac.cpp, whrlpool.cpp, ripemd.cpp Kevin Springle - camellia.cpp, shacal2.cpp, ttmac.cpp, whrlpool.cpp, ripemd.cpp
Ronny Van Keer - sha3.cpp
Aumasson, Neves, Wilcox-O'Hearn and Winnerlein - blake2.cpp, blake2b_simd.cpp, blake2s_simd.cpp
Aaram Yun - aria.cpp, aria_simd.cpp
Han Lulu, Markku-Juhani O. Saarinen - sm4.cpp sm4_simd.cpp
Daniel J. Bernstein, Jack Lloyd - chacha.cpp, chacha_simd.cpp, chacha_avx.cpp
Andrew Moon - ed25519, x25519, donna_32.cpp, donna_64.cpp, donna_sse.cpp
The Crypto++ Library uses portions of Andy Polyakov's CRYPTOGAMS for Poly1305 Permission to use, copy, modify, and distribute this compilation for
scalar multiplication, aes_armv4.S, sha1_armv4.S and sha256_armv4.S. CRYPTOGAMS any purpose, including commercial applications, is hereby granted
is dual licensed with a permissive BSD-style license. The CRYPTOGAMS license is without fee, subject to the following restrictions:
reproduced below.
The Crypto++ Library uses portions of Jack Lloyd's Botan for ChaCha SSE2 and 1. Any copy or modification of this compilation in any form, except
AVX. Botan placed the code in public domain for Crypto++ to use. in object code form as part of an application software, must include
the above copyright notice and this license.
The Crypto++ Library (as a compilation) is currently licensed under the Boost 2. Users of this software agree that any modification or extension
Software License 1.0 (http://www.boost.org/users/license.html). they provide to Wei Dai will be considered public domain and not
copyrighted unless it includes an explicit copyright notice.
Boost Software License - Version 1.0 - August 17th, 2003 3. Wei Dai makes no warranty or representation that the operation of the
software in this compilation will be error-free, and Wei Dai is under no
obligation to provide any services, by way of maintenance, update, or
otherwise. THE SOFTWARE AND ANY DOCUMENTATION ARE PROVIDED "AS IS"
WITHOUT EXPRESS OR IMPLIED WARRANTY INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. IN NO EVENT WILL WEI DAI OR ANY OTHER CONTRIBUTOR BE LIABLE FOR
DIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Permission is hereby granted, free of charge, to any person or organization 4. Users will not use Wei Dai or any other contributor's name in any
obtaining a copy of the software and accompanying documentation covered by publicity or advertising, without prior written consent in each case.
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including 5. Export of this software from the United States may require a
the above license grant, this restriction and the following disclaimer, specific license from the United States Government. It is the
must be included in all copies of the Software, in whole or in part, and responsibility of any person or organization contemplating export
all derivative works of the Software, unless such copies or derivative to obtain such a license before exporting.
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 6. Certain parts of this software may be protected by patents. It
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, is the users' responsibility to obtain the appropriate
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT licenses before using those parts.
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
CRYPTOGAMS License If this compilation is used in object code form in an application
software, acknowledgement of the author is not required but would be
Copyright (c) 2006-2017, CRYPTOGAMS by <appro@openssl.org> appreciated. The contribution of any useful modifications or extensions
All rights reserved. to Wei Dai is not required but would also be appreciated.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain copyright notices,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
* Neither the name of the CRYPTOGAMS nor the names of its copyright
holder and contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
+316 -281
View File
@@ -1,64 +1,55 @@
Crypto++: free C++ Class Library of Cryptographic Schemes Crypto++: a C++ Class Library of Cryptographic Schemes
Version 8.3 - TBD Version 5.6.1 (8/9/2010, SVN r520)
Crypto++ Library is a free C++ class library of cryptographic schemes. Crypto++ Library is a free C++ class library of cryptographic schemes.
Currently the library contains the following algorithms: Currently the library contains the following algorithms:
algorithm type name algorithm type name
authenticated encryption schemes GCM, CCM, EAX, ChaCha20Poly1305 and authenticated encryption schemes GCM, CCM, EAX
XChaCha20Poly1305
high speed stream ciphers ChaCha (8/12/20), ChaCha (IETF), Panama, Salsa20, high speed stream ciphers Panama, Sosemanuk, Salsa20, XSalsa20
Sosemanuk, XSalsa20, XChaCha20
AES and AES candidates AES (Rijndael), RC6, MARS, Twofish, Serpent, AES and AES candidates AES (Rijndael), RC6, MARS, Twofish, Serpent,
CAST-256 CAST-256
ARIA, Blowfish, Camellia, CHAM, HIGHT, IDEA, IDEA, Triple-DES (DES-EDE2 and DES-EDE3),
Kalyna (128/256/512), LEA, SEED, RC5, SHACAL-2, other block ciphers Camellia, SEED, RC5, Blowfish, TEA, XTEA,
other block ciphers SIMON (64/128), Skipjack, SPECK (64/128), Skipjack, SHACAL-2
Simeck, SM4, Threefish (256/512/1024),
Triple-DES (DES-EDE2 and DES-EDE3), TEA, XTEA
block cipher modes of operation ECB, CBC, CBC ciphertext stealing (CTS), block cipher modes of operation ECB, CBC, CBC ciphertext stealing (CTS),
CFB, OFB, counter mode (CTR), XTS CFB, OFB, counter mode (CTR)
message authentication codes BLAKE2s, BLAKE2b, CMAC, CBC-MAC, DMAC, GMAC, HMAC, message authentication codes VMAC, HMAC, GMAC, CMAC, CBC-MAC, DMAC,
Poly1305, Poly1305 (IETF), SipHash, Two-Track-MAC, Two-Track-MAC
VMAC
BLAKE2s, BLAKE2b, Keccack (F1600), SHA-1, SHA-1, SHA-2 (SHA-224, SHA-256, SHA-384, and
hash functions SHA-2 (224/256/384/512), SHA-3 (224/256/384/512), hash functions SHA-512), Tiger, WHIRLPOOL, RIPEMD-128,
SHAKE (128/256), SipHash, SM3, Tiger, RIPEMD-256, RIPEMD-160, RIPEMD-320
RIPEMD (128/160/256/320), WHIRLPOOL
RSA, DSA, Determinsitic DSA, ElGamal, RSA, DSA, ElGamal, Nyberg-Rueppel (NR),
public-key cryptography Nyberg-Rueppel (NR), Rabin-Williams (RW), LUC, public-key cryptography Rabin-Williams (RW), LUC, LUCELG,
LUCELG, EC-based German Digital Signature (ECGDSA),
DLIES (variants of DHAES), ESIGN DLIES (variants of DHAES), ESIGN
padding schemes for public-key PKCS#1 v2.0, OAEP, PSS, PSSR, IEEE P1363 padding schemes for public-key PKCS#1 v2.0, OAEP, PSS, PSSR, IEEE P1363
systems EMSA2 and EMSA5 systems EMSA2 and EMSA5
Diffie-Hellman (DH), Unified Diffie-Hellman (DH2), Diffie-Hellman (DH), Unified Diffie-Hellman
key agreement schemes Menezes-Qu-Vanstone (MQV), Hashed MQV (HMQV), key agreement schemes (DH2), Menezes-Qu-Vanstone (MQV), LUCDIF,
Fully Hashed MQV (FHMQV), LUCDIF, XTR-DH XTR-DH
elliptic curve cryptography ECDSA, Determinsitic ECDSA, ed25519, ECNR, ECIES, elliptic curve cryptography ECDSA, ECNR, ECIES, ECDH, ECMQV
ECDH, ECMQV, x25519
insecure or obsolescent MD2, MD4, MD5, Panama Hash, DES, ARC4, SEAL insecure or obsolescent MD2, MD4, MD5, Panama Hash, DES, ARC4, SEAL
algorithms retained for backwards 3.0, WAKE-OFB, DESX (DES-XEX3), RC2, algorithms retained for backwards 3.0, WAKE, WAKE-OFB, DESX (DES-XEX3), RC2,
compatibility and historical SAFER, 3-WAY, GOST, SHARK, CAST-128, Square compatibility and historical SAFER, 3-WAY, GOST, SHARK, CAST-128, Square
value value
Other features include: Other features include:
* pseudo random number generators (PRNG): ANSI X9.17 appendix C, RandomPool, * pseudo random number generators (PRNG): ANSI X9.17 appendix C, RandomPool
DARN, VIA Padlock, RDRAND, RDSEED, NIST Hash and HMAC DRBGs
* password based key derivation functions: PBKDF1 and PBKDF2 from PKCS #5, * password based key derivation functions: PBKDF1 and PBKDF2 from PKCS #5,
PBKDF from PKCS #12 appendix B, HKDF from RFC 5869, Scrypt from RFC 7914 PBKDF from PKCS #12 appendix B
* Shamir's secret sharing scheme and Rabin's information dispersal algorithm * Shamir's secret sharing scheme and Rabin's information dispersal algorithm
(IDA) (IDA)
* fast multi-precision integer (bignum) and polynomial operations * fast multi-precision integer (bignum) and polynomial operations
@@ -67,38 +58,32 @@ Other features include:
* useful non-cryptographic algorithms * useful non-cryptographic algorithms
+ DEFLATE (RFC 1951) compression/decompression with gzip (RFC 1952) and + DEFLATE (RFC 1951) compression/decompression with gzip (RFC 1952) and
zlib (RFC 1950) format support zlib (RFC 1950) format support
+ Hex, base-32, base-64, URL safe base-64 encoding and decoding + hex, base-32, and base-64 coding/decoding
+ 32-bit CRC, CRC-C and Adler32 checksum + 32-bit CRC and Adler32 checksum
* class wrappers for these platform and operating system features (optional): * class wrappers for these operating system features (optional):
+ high resolution timers on Windows, Unix, and Mac OS + high resolution timers on Windows, Unix, and Mac OS
+ Berkeley and Windows style sockets
+ Windows named pipes
+ /dev/random, /dev/urandom, /dev/srandom + /dev/random, /dev/urandom, /dev/srandom
+ Microsoft's CryptGenRandom or BCryptGenRandom on Windows + Microsoft's CryptGenRandom on Windows
* A high level interface for most of the above, using a filter/pipeline * A high level interface for most of the above, using a filter/pipeline
metaphor metaphor
* benchmarks and validation testing * benchmarks and validation testing
* x86, x64 (x86-64), x32 (ILP32), ARM-32, Aarch32, Aarch64 and Power8 in-core code * x86, x86-64 (x64), MMX, and SSE2 assembly code for the most commonly used
for the commonly used algorithms algorithms, with run-time CPU feature detection and code selection
+ run-time CPU feature detection and code selection * some versions are available in FIPS 140-2 validated form
+ supports GCC-style and MSVC-style inline assembly, and MASM for x64
+ x86, x64 (x86-64), x32 provides MMX, SSE2, and SSE4 implementations
+ ARM-32, Aarch32 and Aarch64 provides NEON, ASIMD and ARMv8 implementations
+ Power8 provides in-core AES using NX Crypto Acceleration
The Crypto++ library was orginally written by Wei Dai. The library is now You are welcome to use it for any purpose without paying me, but see
maintained by several team members and the community. You are welcome to use it License.txt for the fine print.
for any purpose without paying anyone, but see License.txt for the fine print.
The following compilers are supported for this release. Please visit The following compilers are supported for this release. Please visit
http://www.cryptopp.com the most up to date build instructions and porting notes. http://www.cryptopp.com the most up to date build instructions and porting notes.
* Visual Studio 2003 - 2019 * MSVC 6.0 - 2010
* GCC 3.3 - 10.1 * GCC 3.3 - 4.5
* Apple Clang 4.3 - 9.3 * C++Builder 2010
* LLVM Clang 2.9 - 10.0 * Intel C++ Compiler 9 - 11.1
* C++ Builder 2015 * Sun Studio 12u1, Express 11/08, Express 06/10
* Intel C++ Compiler 9 - 16.0
* Sun Studio 12u1 - 12.6
* IBM XL C/C++ 10.0 - 13.3
*** Important Usage Notes *** *** Important Usage Notes ***
@@ -114,24 +99,28 @@ synchronization when multiple threads access a common Crypto++ object.
*** MSVC-Specific Information *** *** MSVC-Specific Information ***
To compile Crypto++ with MSVC, open "cryptest.sln" (for MSVC 2003 - 2015) On Windows, Crypto++ can be compiled into 3 forms: a static library
and build one or more of the following projects: including all algorithms, a DLL with only FIPS Approved algorithms, and
a static library with only algorithms not in the DLL.
(FIPS Approved means Approved according to the FIPS 140-2 standard.)
The DLL may be used by itself, or it may be used together with the second
form of the static library. MSVC project files are included to build
all three forms, and sample applications using each of the three forms
are also included.
To compile Crypto++ with MSVC, open the "cryptest.dsw" (for MSVC 6 and MSVC .NET
2003) or "cryptest.sln" (for MSVC 2005 - 2010) workspace file and build one or
more of the following projects:
cryptopp - This builds the DLL. Please note that if you wish to use Crypto++
as a FIPS validated module, you must use a pre-built DLL that has undergone
the FIPS validation process instead of building your own.
dlltest - This builds a sample application that only uses the DLL.
cryptest Non-DLL-Import Configuration - This builds the full static library cryptest Non-DLL-Import Configuration - This builds the full static library
along with a full test driver. along with a full test driver.
cryptest DLL-Import Configuration - This builds a static library containing cryptest DLL-Import Configuration - This builds a static library containing
only algorithms not in the DLL, along with a full test driver that uses only algorithms not in the DLL, along with a full test driver that uses
both the DLL and the static library. both the DLL and the static library.
cryptdll - This builds the DLL. Please note that if you wish to use Crypto++
as a FIPS validated module, you must use a pre-built DLL that has undergone
the FIPS validation process instead of building your own.
dlltest - This builds a sample application that only uses the DLL.
The DLL used to provide FIPS validated cryptography. The library was moved
to the CMVP's <A HREF=
"http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140val-historical.htm">
Historical Validation List</A>. The library and the DLL are no longer considered
validated. You should no longer use the DLL.
To use the Crypto++ DLL in your application, #include "dll.h" before including To use the Crypto++ DLL in your application, #include "dll.h" before including
any other Crypto++ header files, and place the DLL in the same directory as any other Crypto++ header files, and place the DLL in the same directory as
@@ -168,66 +157,12 @@ and "SetNewAndDeleteFromCryptoPP". If one of these functions is found,
Crypto++ uses methods 1 or 2, respectively, by calling the function. Crypto++ uses methods 1 or 2, respectively, by calling the function.
Otherwise, method 3 is used. Otherwise, method 3 is used.
*** Linux and Unix-like Specific Information *** *** GCC-Specific Information ***
A makefile is included for you to compile Crypto++ with GCC and compatibles. A makefile is included for you to compile Crypto++ with GCC. Make sure
Make sure you are using GNU Make and GNU ld. The make process will produce you are using GNU Make and GNU ld. The make process will produce two files,
two files, libcryptopp.a and cryptest.exe. Run "cryptest.exe v" for the libcryptopp.a and cryptest.exe. Run "cryptest.exe v" for the validation
validation suite and "cryptest.exe tv all" for additional test vectors. suite.
The makefile uses '-DNDEBUG -g2 -O2' CXXFLAGS by default. If you use an
alternate build system, like Autotools or CMake, then ensure the build system
includes '-DNDEBUG' for production or release builds. The Crypto++ library uses
asserts for debugging and diagnostics during development; it does not
rely on them to crash a program at runtime.
If an assert triggers in production software, then unprotected sensitive
information could be egressed from the program to the filesystem or the
platform's error reporting program, like Apport on Ubuntu or CrashReporter
on Apple.
The makefile orders object files to help remediate problems associated with
C++ static initialization order. The library does not use custom linker scripts.
If you use an alternate build system, like Autotools or CMake, and collect source
files into a list, then ensure these three are at the head of the list: 'cryptlib.cpp
cpu.cpp integer.cpp <other sources>'. They should be linked in the same order:
'cryptlib.o cpu.o integer.o <other objects>'.
If your linker supports initialization attributes, like init_priority, then you can
define CRYPTOPP_INIT_PRIORITY to control object initialization order. Set it to a
value like 250. User programs can use CRYPTOPP_USER_PRIORITY to avoid conflicts with
library values. Initialization attributes are more reliable than object file ordering,
but its not ubiquitously supported by linkers.
The makefile links to the static version of the Crypto++ library to avoid binary
planting and other LD_PRELOAD tricks. You should use the static version of the
library in your programs to help avoid unwanted redirections.
*** Side Channel Attacks ***
Crypto++ attempts to resist side channel attacks using various remediations.
The remdiations are applied as a best effort but are probably incomplete. They
are incomplete due to cpu speculation bugs like Spectre, Meltdown, Foreshadow.
The attacks target both cpu caches and internal buffers. Intel generally refers
to internal buffer attacks as "Microarchitectural Data Sampling" (MDS).
The library uses hardware instructions when possible for block ciphers, hashes
and other operations. The hardware acceleration remediates some timing
attacks. The library also uses cache-aware algoirthms and access patterns
to minimize leakage cache evictions.
Some of the public key algorithms have branches and some of the branches depend
on data that can be private or secret. The branching occurs in some field
operations like exponentiation over integers and elliptic curves. The branching
has been minimized but not completely eliminated.
Crypto++ does not enagage Specter remediations at this time. The GCC options
for Specter are -mfunction-return=thunk and -mindirect-branch=thunk, and the
library uses them during testing. If you want the Specter workarounds then add
the GCC options to your CXXFLAGS when building the library.
To help resist attacks you should disable hyperthreading on cpus. If you
suspect or find an information leak then please report it.
*** Documentation and Support *** *** Documentation and Support ***
@@ -236,174 +171,274 @@ processed through Doxygen to produce an HTML reference manual. You can find
a link to the manual from http://www.cryptopp.com. Also at that site is a link to the manual from http://www.cryptopp.com. Also at that site is
the Crypto++ FAQ, which you should browse through before attempting to the Crypto++ FAQ, which you should browse through before attempting to
use this library, because it will likely answer many of questions that use this library, because it will likely answer many of questions that
may come up. Finally, the site provide the wiki which has many topics may come up.
and code examples.
If you run into any problems, please try the Crypto++ mailing list. If you run into any problems, please try the Crypto++ mailing list.
The subscription information and the list archive are available on The subscription information and the list archive are available on
http://www.cryptopp.com. http://www.cryptopp.com. You can also email me directly by visiting
http://www.weidai.com, but you will probably get a faster response through
*** Source Code and Contributing *** the mailing list.
The source code and its planned changes are available at the following locations.
* The Crypto++ GitHub repository allows you to view the latest (unreleased)
Crypto++ source code via the Linux kernel's git beginning around June 2015.
Its also serves as an incubator to nuture and grow the library.
* The former Crypto++ SourceForge repository allows you to view the Crypto++
source code via Apache's subversion until about July 2015. At that time,
SourceForge had infrastructure problems and a cutover to GutHub was performed.
* The Roadmap on the wiki provides the general direction the library is heading.
It includes planned features and releases, and even some wishlist items.
Contributions of all types are welcomed. Contributions include the following.
* Bug finding and fixes
* Features and enhancements
* Test scripts and test cases
* Branch and release testing
* Documentation and updates
If you think you have found a bug in the library, then you should discuss it on the
Users mailing list. Discussing it will help bring the issue to the attention of folks
who can help resolve the issue. If you want to contribute a bug fix to the library,
then make a Pull Request or make a Diff available somewhere. Also see Bug Reports on
the wiki.
Features and enhancements are welcomend additions to the library. This category tends
to be time consuming because algorithms and their test cases need to be reviewed and
merged. Please be mindful of the test cases, and attempt to procure them from an
independent source.
The library cherishes test scripts and test cases. They ensure the library is fit and
they help uncover issues with the library before users experience them. If you have
some time, then write some test cases, especially the ones that are intended to break
things.
Branch and release testing is your chance to ensure Master (and planned merges) meets
your expectations and perform as expected. If you have a few spare cycles, then please
test Master on your favorite platform. We need more testing on MinGW, Windows Phone,
Windows Store, Solaris 10 (and below), and modern iOS and OS X (including TV and
Watch builds).
Documentation and updates includes both the inline source code annotations using
Doxygen, and the online information provided in the wiki. The wiki is more verbose and
usually provides more contextual information than the API reference. Besides testing,
documentation is one of the highest returns on investment.
*** History *** *** History ***
The items in this section comprise the most recent history. Please see History.txt 1.0 - First public release. Withdrawn at the request of RSA DSI.
for the record back to Crypto++ 1.0. - included Blowfish, BBS, DES, DH, Diamond, DSA, ElGamal, IDEA,
MD5, RC4, RC5, RSA, SHA, WAKE, secret sharing, DEFLATE compression
- had a serious bug in the RSA key generation code.
8.2.0 - April 28, 2019 1.1 - Removed RSA, RC4, RC5
- minor release, no recompile of programs required - Disabled calls to RSAREF's non-public functions
- expanded community input and support - Minor bugs fixed
* 56 unique contributors as of this release
- use PowerPC unaligned loads and stores with Power8
- add SKIPJACK test vectors
- fix SHAKE-128 and SHAKE-256 compile
- removed IS_NEON from Makefile
- fix Aarch64 build on Fedora 29
- fix missing GF2NT_233_Multiply_Reduce_CLMUL in FIPS DLL
- add missing BLAKE2 constructors
- fix missing BlockSize() in BLAKE2 classes
8.1.0 - February 22, 2019 2.0 - a completely new, faster multiprecision integer class
- minor release, no recompile of programs required - added MD5-MAC, HAVAL, 3-WAY, TEA, SAFER, LUC, Rabin, BlumGoldwasser,
- expanded community input and support elliptic curve algorithms
* 56 unique contributors as of this release - added the Lucas strong probable primality test
- fix OS X PowerPC builds with Clang - ElGamal encryption and signature schemes modified to avoid weaknesses
- add Microsoft ARM64 support - Diamond changed to Diamond2 because of key schedule weakness
- fix iPhone Simulator build due to missing symbols - fixed bug in WAKE key setup
- add CRYPTOPP_BUGGY_SIMD_LOAD_AND_STORE - SHS class renamed to SHA
- add carryless multiplies for NIST b233 and k233 curves - lots of miscellaneous optimizations
- fix OpenMP build due to use of OpenMP 4 with down-level compilers
- add SignStream and VerifyStream for ed25519 and large files
- fix missing AlgorithmProvider in PanamaHash
- add SHAKE-128 and SHAKE-256
- fix AVX2 build due to _mm256_broadcastsi128_si256
- add IETF ChaCha, XChaCha, ChaChaPoly1305 and XChaChaPoly1305
8.0.0 - December 28, 2018 2.1 - added Tiger, HMAC, GOST, RIPE-MD160, LUCELG, LUCDIF, XOR-MAC,
- major release, recompile of programs required OAEP, PSSR, SHARK
- expanded community input and support - added precomputation to DH, ElGamal, DSA, and elliptic curve algorithms
* 54 unique contributors as of this release - added back RC5 and a new RSA
- add x25519 key exchange and ed25519 signature scheme - optimizations in elliptic curves over GF(p)
- add limited Asymmetric Key Package support from RFC 5958 - changed Rabin to use OAEP and PSSR
- add Power9 DARN random number generator support - changed many classes to allow copy constructors to work correctly
- add CHAM, HC-128, HC-256, Hight, LEA, Rabbit, Simeck - improved exception generation and handling
- fix FixedSizeAllocatorWithCleanup may be unaligned on some platforms
- cutover to GNU Make-based cpu feature tests
- rename files with dashes to underscores
- fix LegacyDecryptor and LegacyDecryptorWithMAC use wrong MAC
- fix incorrect AES/CBC decryption on Windows
- avoid Singleton<T> when possible, avoid std::call_once completely
- fix SPARC alignment problems due to GetAlignmentOf<T>() on word64
- add ARM AES asm implementation from Cryptogams
- remove CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS support
7.0.0 - April 8, 2018 2.2 - added SEAL, CAST-128, Square
- major release, recompile of programs required - fixed bug in HAVAL (padding problem)
- expanded community input and support - fixed bug in triple-DES (decryption order was reversed)
* 48 unique contributors as of this release - fixed bug in RC5 (couldn't handle key length not a multiple of 4)
- fix incorrect result when using Integer::ModInverse - changed HMAC to conform to RFC-2104 (which is not compatible
* may be CVE worthy, but request was not submitted with the original HMAC)
- fix ARIA/CTR bus error on Sparc64 - changed secret sharing and information dispersal to use GF(2^32)
- fix incorrect result when using a_exp_b_mod_c instead of GF(65521)
- fix undeclared identifier uint32_t on early Visual Studio - removed zero knowledge prover/verifier for graph isomorphism
- fix iPhoneSimulator build on i386 - removed several utility classes in favor of the C++ standard library
- fix incorrect adler32 in ZlibDecompressor
- fix Power7 test using PPC_FEATURE_ARCH_2_06
- workaround incorrect Glibc sysconf return value on ppc64-le
- add KeyDerivationFunction interface
- add scrypt key derivation function
- add Salsa20_Core transform callable from outside class
- add sbyte, sword16, sword32 and sword64
- remove s_nullNameValuePairs from unnamed namespace
- ported to MSVC 2017, Xcode 9.3, Sun Studio 12.5, GCC 8.0.1,
MacPorts GCC 7.0, Clang 4.0, Intel C++ 17.00, IBM XL C/C++ 13.1
6.1.0 - February 22, 2018 2.3 - ported to EGCS
- minor release, maintenance items - fixed incomplete workaround of min/max conflict in MSVC
- expanded community input and support
* 46 unique contributors as of this release
- use 2048-bit modulus default for DSA
- fix build under Linuxbrew
- use /bin/sh in GNUmakefile
- fix missing flags for SIMON and SPECK in GNUMakefile-cross
- fix ARM and MinGW misdetection
- port setenv-android.sh to latest NDK
- fix Clang check for C++11 lambdas
- Simon and Speck to little-endian implementation
- use LIB_MAJOR for ABI compatibility
- fix ODR violation in AdvancedProcessBlocks_{ARCH} templates
- handle C++17 std::uncaught_exceptions
- ported to MSVC 2017, Xcode 8.1, Sun Studio 12.5, GCC 8.0.1,
MacPorts GCC 7.0, Clang 4.0, Intel C++ 17.00, IBM XL C/C++ 13.1
6.0.0 - January 22, 2018 3.0 - placed all names into the "CryptoPP" namespace
- major release, recompile of programs required - added MD2, RC2, RC6, MARS, RW, DH2, MQV, ECDHC, CBC-CTS
- expanded community input and support - added abstract base classes PK_SimpleKeyAgreementDomain and
* 43 unique contributors as of this release PK_AuthenticatedKeyAgreementDomain
- fixed CVE-2016-9939 (Issue 346, transient DoS) - changed DH and LUCDIF to implement the PK_SimpleKeyAgreementDomain
- fixed CVE-2017-9434 (Issue 414, misidentified memory error) interface and to perform domain parameter and key validation
- converted to BASE+SIMD implementation - changed interfaces of PK_Signer and PK_Verifier to sign and verify
* BASE provides an architecture neutral C++ implementation messages instead of message digests
* SIMD provides architecture specific hardware acceleration - changed OAEP to conform to PKCS#1 v2.0
- improved PowerPC Power4, Power7 and Power8 support - changed benchmark code to produce HTML tables as output
- added ARIA, EC German DSA, Deterministic signatures (RFC 6979), - changed PSSR to track IEEE P1363a
Kalyna, NIST Hash and HMAC DRBG, Padlock RNG, Poly1305, SipHash, - renamed ElGamalSignature to NR and changed it to track IEEE P1363
Simon, Speck, SM3, SM4, Threefish algorithms - renamed ECKEP to ECMQVC and changed it to track IEEE P1363
- added NaCl interface from the compact library - renamed several other classes for clarity
* x25519 key exhange and ed25519 signing provided through NaCl interface - removed support for calling RSAREF
- improved Testing and QA - removed option to compile old SHA (SHA-0)
- ported to MSVC 2017, Xcode 8.1, Sun Studio 12.5, GCC 7.3, - removed option not to throw exceptions
MacPorts GCC 7.0, Clang 4.0, Intel C++ 17.00, IBM XL C/C++ 13.1
June 2015 - Changing of the guard. Wei Dai turned the library over to the 3.1 - added ARC4, Rijndael, Twofish, Serpent, CBC-MAC, DMAC
community. The first community release was Crypto++ 5.6.3. Wei is - added interface for querying supported key lengths of symmetric ciphers
no longer involved with the daily operations of the project. Wei and MACs
still provides guidance when we have questions. - added sample code for RSA signature and verification
- changed CBC-CTS to be compatible with RFC 2040
- updated SEAL to version 3.0 of the cipher specification
- optimized multiprecision squaring and elliptic curves over GF(p)
- fixed bug in MARS key setup
- fixed bug with attaching objects to Deflator
Originally written by Wei Dai, maintained by the Crypto++ Project 3.2 - added DES-XEX3, ECDSA, DefaultEncryptorWithMAC
- renamed DES-EDE to DES-EDE2 and TripleDES to DES-EDE3
- optimized ARC4
- generalized DSA to allow keys longer than 1024 bits
- fixed bugs in GF2N and ModularArithmetic that can cause calculation errors
- fixed crashing bug in Inflator when given invalid inputs
- fixed endian bug in Serpent
- fixed padding bug in Tiger
4.0 - added Skipjack, CAST-256, Panama, SHA-2 (SHA-256, SHA-384, and SHA-512),
and XTR-DH
- added a faster variant of Rabin's Information Dispersal Algorithm (IDA)
- added class wrappers for these operating system features:
- high resolution timers on Windows, Unix, and MacOS
- Berkeley and Windows style sockets
- Windows named pipes
- /dev/random and /dev/urandom on Linux and FreeBSD
- Microsoft's CryptGenRandom on Windows
- added support for SEC 1 elliptic curve key format and compressed points
- added support for X.509 public key format (subjectPublicKeyInfo) for
RSA, DSA, and elliptic curve schemes
- added support for DER and OpenPGP signature format for DSA
- added support for ZLIB compressed data format (RFC 1950)
- changed elliptic curve encryption to use ECIES (as defined in SEC 1)
- changed MARS key schedule to reflect the latest specification
- changed BufferedTransformation interface to support multiple channels
and messages
- changed CAST and SHA-1 implementations to use public domain source code
- fixed bug in StringSource
- optmized multi-precision integer code for better performance
4.1 - added more support for the recommended elliptic curve parameters in SEC 2
- added Panama MAC, MARC4
- added IV stealing feature to CTS mode
- added support for PKCS #8 private key format for RSA, DSA, and elliptic
curve schemes
- changed Deflate, MD5, Rijndael, and Twofish to use public domain code
- fixed a bug with flushing compressed streams
- fixed a bug with decompressing stored blocks
- fixed a bug with EC point decompression using non-trinomial basis
- fixed a bug in NetworkSource::GeneralPump()
- fixed a performance issue with EC over GF(p) decryption
- fixed syntax to allow GCC to compile without -fpermissive
- relaxed some restrictions in the license
4.2 - added support for longer HMAC keys
- added MD4 (which is not secure so use for compatibility purposes only)
- added compatibility fixes/workarounds for STLport 4.5, GCC 3.0.2,
and MSVC 7.0
- changed MD2 to use public domain code
- fixed a bug with decompressing multiple messages with the same object
- fixed a bug in CBC-MAC with MACing multiple messages with the same object
- fixed a bug in RC5 and RC6 with zero-length keys
- fixed a bug in Adler32 where incorrect checksum may be generated
5.0 - added ESIGN, DLIES, WAKE-OFB, PBKDF1 and PBKDF2 from PKCS #5
- added key validation for encryption and signature public/private keys
- renamed StreamCipher interface to SymmetricCipher, which is now implemented
by both stream ciphers and block cipher modes including ECB and CBC
- added keying interfaces to support resetting of keys and IVs without
having to destroy and recreate objects
- changed filter interface to support non-blocking input/output
- changed SocketSource and SocketSink to use overlapped I/O on Microsoft Windows
- grouped related classes inside structs to help templates, for example
AESEncryption and AESDecryption are now AES::Encryption and AES::Decryption
- where possible, typedefs have been added to improve backwards
compatibility when the CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY macro is defined
- changed Serpent, HAVAL and IDEA to use public domain code
- implemented SSE2 optimizations for Integer operations
- fixed a bug in HMAC::TruncatedFinal()
- fixed SKIPJACK byte ordering following NIST clarification dated 5/9/02
5.01 - added known answer test for X9.17 RNG in FIPS 140 power-up self test
- submitted to NIST/CSE, but not publicly released
5.02 - changed EDC test to MAC integrity check using HMAC/SHA1
- improved performance of integrity check
- added blinding to defend against RSA timing attack
5.03 - created DLL version of Crypto++ for FIPS 140-2 validation
- fixed vulnerabilities in GetNextIV for CTR and OFB modes
5.0.4 - Removed DES, SHA-256, SHA-384, SHA-512 from DLL
5.1 - added PSS padding and changed PSSR to track IEEE P1363a draft standard
- added blinding for RSA and Rabin to defend against timing attacks
on decryption operations
- changed signing and decryption APIs to support the above
- changed WaitObjectContainer to allow waiting for more than 64
objects at a time on Win32 platforms
- fixed a bug in CBC and ECB modes with processing non-aligned data
- fixed standard conformance bugs in DLIES (DHAES mode) and RW/EMSA2
signature scheme (these fixes are not backwards compatible)
- fixed a number of compiler warnings, minor bugs, and portability problems
- removed Sapphire
5.2 - merged in changes for 5.01 - 5.0.4
- added support for using encoding parameters and key derivation parameters
with public key encryption (implemented by OAEP and DL/ECIES)
- added Camellia, SHACAL-2, Two-Track-MAC, Whirlpool, RIPEMD-320,
RIPEMD-128, RIPEMD-256, Base-32 coding, FIPS variant of CFB mode
- added ThreadUserTimer for timing thread CPU usage
- added option for password-based key derivation functions
to iterate until a mimimum elapsed thread CPU time is reached
- added option (on by default) for DEFLATE compression to detect
uncompressible files and process them more quickly
- improved compatibility and performance on 64-bit platforms,
including Alpha, IA-64, x86-64, PPC64, Sparc64, and MIPS64
- fixed ONE_AND_ZEROS_PADDING to use 0x80 instead 0x01 as padding.
- fixed encoding/decoding of PKCS #8 privateKeyInfo to properly
handle optional attributes
5.2.1 - fixed bug in the "dlltest" DLL testing program
- fixed compiling with STLport using VC .NET
- fixed compiling with -fPIC using GCC
- fixed compiling with -msse2 on systems without memalign()
- fixed inability to instantiate PanamaMAC
- fixed problems with inline documentation
5.2.2 - added SHA-224
- put SHA-256, SHA-384, SHA-512, RSASSA-PSS into DLL
5.2.3 - fixed issues with FIPS algorithm test vectors
- put RSASSA-ISO into DLL
5.3 - ported to MSVC 2005 with support for x86-64
- added defense against AES timing attacks, and more AES test vectors
- changed StaticAlgorithmName() of Rijndael to "AES", CTR to "CTR"
5.4 - added Salsa20
- updated Whirlpool to version 3.0
- ported to GCC 4.1, Sun C++ 5.8, and Borland C++Builder 2006
5.5 - added VMAC and Sosemanuk (with x86-64 and SSE2 assembly)
- improved speed of integer arithmetic, AES, SHA-512, Tiger, Salsa20,
Whirlpool, and PANAMA cipher using assembly (x86-64, MMX, SSE2)
- optimized Camellia and added defense against timing attacks
- updated benchmarks code to show cycles per byte and to time key/IV setup
- started using OpenMP for increased multi-core speed
- enabled GCC optimization flags by default in GNUmakefile
- added blinding and computational error checking for RW signing
- changed RandomPool, X917RNG, GetNextIV, DSA/NR/ECDSA/ECNR to reduce
the risk of reusing random numbers and IVs after virtual machine state
rollback
- changed default FIPS mode RNG from AutoSeededX917RNG<DES_EDE3> to
AutoSeededX917RNG<AES>
- fixed PANAMA cipher interface to accept 256-bit key and 256-bit IV
- moved MD2, MD4, MD5, PanamaHash, ARC4, WAKE_CFB into the namespace "Weak"
- removed HAVAL, MD5-MAC, XMAC
5.5.1 - fixed VMAC validation failure on 32-bit big-endian machines
5.5.2 - ported x64 assembly language code for AES, Salsa20, Sosemanuk, and Panama
to MSVC 2005 (using MASM since MSVC doesn't support inline assembly on x64)
- fixed Salsa20 initialization crash on non-SSE2 machines
- fixed Whirlpool crash on Pentium 2 machines
- fixed possible branch prediction analysis (BPA) vulnerability in
MontgomeryReduce(), which may affect security of RSA, RW, LUC
- fixed link error with MSVC 2003 when using "debug DLL" form of runtime library
- fixed crash in SSE2_Add on P4 machines when compiled with
MSVC 6.0 SP5 with Processor Pack
- ported to MSVC 2008, GCC 4.2, Sun CC 5.9, Intel C++ Compiler 10.0,
and Borland C++Builder 2007
5.6.0 - added AuthenticatedSymmetricCipher interface class and Filter wrappers
- added CCM, GCM (with SSE2 assembly), EAX, CMAC, XSalsa20, and SEED
- added support for variable length IVs
- added OIDs for Brainpool elliptic curve parameters
- improved AES and SHA-256 speed on x86 and x64
- changed BlockTransformation interface to no longer assume data alignment
- fixed incorrect VMAC computation on message lengths
that are >64 mod 128 (x86 assembly version is not affected)
- fixed compiler error in vmac.cpp on x86 with GCC -fPIC
- fixed run-time validation error on x86-64 with GCC 4.3.2 -O2
- fixed HashFilter bug when putMessage=true
- fixed AES-CTR data alignment bug that causes incorrect encryption on ARM
- removed WORD64_AVAILABLE; compiler support for 64-bit int is now required
- ported to GCC 4.3, C++Builder 2009, Sun CC 5.10, Intel C++ Compiler 11
5.6.1 - added support for AES-NI and CLMUL instruction sets in AES and GMAC/GCM
- removed WAKE-CFB
- fixed several bugs in the SHA-256 x86/x64 assembly code:
* incorrect hash on non-SSE2 x86 machines on non-aligned input
* incorrect hash on x86 machines when input crosses 0x80000000
* incorrect hash on x64 when compiled with GCC with optimizations enabled
- fixed bugs in AES x86 and x64 assembly causing crashes in some MSVC build configurations
- switched to a public domain implementation of MARS
- ported to MSVC 2010, GCC 4.5.1, Sun Studio 12u1, C++Builder 2010, Intel C++ Compiler 11.1
- renamed the MSVC DLL project to "cryptopp" for compatibility with MSVC 2010
Written by Wei Dai
-45
View File
@@ -1,45 +0,0 @@
0123456789ABCDEFFEDCBA9876543210 0123456789ABCDEFFEDCBA9876543210 7DC1917AE0D38FAE8D4A7D1959AEF27C
80000000000000000000000000000000 00000000000000000000000000000000 4ABA3055788204D82F4539D81BC9384B
00000000000000000000000000000001 00000000000000000000000000000000 5FA57C3B2E71144C3E5E1E9BE4F0FE7E
00000000000000000000000000000000 80000000000000000000000000000000 92E51E737DABB6BFD0EABC8D32224F77
00000000000000000000000000000000 00000000000000000000000000000001 B426E1A441F6DBFC2B2D2412D0066D20
00000000000000000000000000000000 00000000000000000000000000000000 4B40A63C7F0171EE3CDDA4363FBFAE75
01010101010101010101010101010101 01010101010101010101010101010101 CCE5D964A71D7A5E93986BCA572BB050
02020202020202020202020202020202 02020202020202020202020202020202 A04100328F459F6AAE8EBAB3B5FE90A8
04040404040404040404040404040404 04040404040404040404040404040404 BFE5C38FE204ADC614A321786CDCA08E
08080808080808080808080808080808 08080808080808080808080808080808 95A3371D4879057FAEB2E573CCE8A7F5
10101010101010101010101010101010 10101010101010101010101010101010 80AF7861CA5855FBED523345D36619EC
20202020202020202020202020202020 20202020202020202020202020202020 82E9D82550AECD0E0BB1B63E4B30CEC3
40404040404040404040404040404040 40404040404040404040404040404040 C80C04BA36ED0DA52B3E6CB430617FAC
80808080808080808080808080808080 80808080808080808080808080808080 41305D0632AC493419B04F3BCDBA6AE4
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF B99D80EF798362ACEB9E960AAE7EECC2
0123456789ABCDEFFEDCBA98765432100011223344556677 0123456789ABCDEFFEDCBA9876543210 6DC2DBDAC3C563E522F5A75942B8AFAC
800000000000000000000000000000000000000000000000 00000000000000000000000000000000 F9BA9C6E7E3C86FAE4BEB607F387548E
000000000000000000000000000000000000000000000001 00000000000000000000000000000000 5BC2C08F01C0CDC2F983073CBE9194D2
000000000000000000000000000000000000000000000000 80000000000000000000000000000000 AE56BF59874ED4DBD7B905878894ADEE
000000000000000000000000000000000000000000000000 00000000000000000000000000000001 D53236B0CDE20C26F57675A7405A9F98
000000000000000000000000000000000000000000000000 00000000000000000000000000000000 D5526B5E6A1E3DF23AD8ECAF20F281D0
010101010101010101010101010101010101010101010101 01010101010101010101010101010101 6E4C91AB71707075F375FFB7B3D27328
020202020202020202020202020202020202020202020202 02020202020202020202020202020202 D686D2A6F3BBBC5E703528FD4B1DBA8F
040404040404040404040404040404040404040404040404 04040404040404040404040404040404 ADE1730DA6F15693FD9F063DFC8EC4D1
080808080808080808080808080808080808080808080808 08080808080808080808080808080808 6A3FCA9070151FF14142B1700BE075EB
101010101010101010101010101010101010101010101010 10101010101010101010101010101010 773EC2820CCD29CA650DEA05E04CEB80
202020202020202020202020202020202020202020202020 20202020202020202020202020202020 531A8B8F5F1228E16B57E5365A1FB02B
404040404040404040404040404040404040404040404040 40404040404040404040404040404040 C0166DB2A70DF611921E7F0AB0E0F15D
808080808080808080808080808080808080808080808080 80808080808080808080808080808080 70F3361D505A220B1C2328EBE32ED731
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF F275975CCC163ED53AA0510443239638
0123456789ABCDEFFEDCBA987654321000112233445566778899AABBCCDDEEFF 0123456789ABCDEFFEDCBA9876543210 2F4792014AE2D9B812ADBAC663DC762B
8000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000 9250C9771F5A5A8612400AA917491263
0000000000000000000000000000000000000000000000000000000000000001 00000000000000000000000000000000 1A6AED07EC57E4373E988BFBB396406F
0000000000000000000000000000000000000000000000000000000000000000 80000000000000000000000000000000 209ACF63CE6DFB56B1F9821DDBFE86E3
0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000001 678FFFFDCE3177605F9320FEC4D30B5E
0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000 C20857DD9106DDDE286EC59FA98D77CC
0101010101010101010101010101010101010101010101010101010101010101 01010101010101010101010101010101 15C28D4EC27D8BEDDD8E6B3745A9A261
0202020202020202020202020202020202020202020202020202020202020202 02020202020202020202020202020202 5279DA1773C078835D506B25FED6513E
0404040404040404040404040404040404040404040404040404040404040404 04040404040404040404040404040404 7AED38F56F62FC75F7DB88F7E59D0B02
0808080808080808080808080808080808080808080808080808080808080808 08080808080808080808080808080808 6EB3C2BC1AC20926E860E688786DB872
1010101010101010101010101010101010101010101010101010101010101010 10101010101010101010101010101010 54A8718B4DD1A03B1A4ED06C30B9E6AB
2020202020202020202020202020202020202020202020202020202020202020 20202020202020202020202020202020 A876FA5538F926B373702DABF33025B6
4040404040404040404040404040404040404040404040404040404040404040 40404040404040404040404040404040 B71AB43F56E09592E69E315E7CD06E8A
8080808080808080808080808080808080808080808080808080808080808080 80808080808080808080808080808080 E975FB1435D92A0CF3E1A2487774D699
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 6C833E3962286C0DE0395446ED30F646
-1
View File
@@ -1 +0,0 @@
nCBţ pIbź_¤_ĺ|źâ+"w˙¶¶†Ž˝í#Aýíż‡„nŢmÖéŠČ‡ű%±––kXřťąRňłüw`Ză‘^s.+ÚÚµř„Š`ŠÝBf]zó•}¦R`}\ŘdiśbfttÉ^ř˛
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
3081C80201003081A406072A8648CE3D0201308198020101302006072A8648CE3D0101021500FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF302C0414FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC04141C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA450429044A96B5688EF573284664698968C38BB913CBFC8223A628553168947D59DCC912042351377AC5FB3202150100000000000000000001F4C8F927AED3CA752257020101041C301A02010104150023A68821ABB99DBB8429ED2320D61A8EA4C6D81B
-1
View File
@@ -1 +0,0 @@
3081D10201003081AD06072A8648CE3D02013081A1020101302506072A8648CE3D0102301A020200A306092A8648CE3D010203033009020103020106020107302E041507B6882CAAEFA84F9554FF8428BD88E246D2782AE204150713612DCDDCB40AAB946BDA29CA91F73AF958AFD9042B040369979697AB43897789566789567F787A7876A65400435EDB42EFAFB2989D51FEFCE3C80988F41FF883021503FFFFFFFFFFFFFFFFFFFF48AAB689C29CA710279B020102041C301A02010104150003693AB4D83EE8B544548BE7647AEA0EA64E8211
-1
View File
@@ -1 +0,0 @@
302E020100300506032B65700422042098C59D3F097FB23D44BA90791281B453258D691A55AF5CE4F1EE712FDF91AE6D
-1
View File
@@ -1 +0,0 @@
302E020100300506032B65700422042030BF776A497D7F1E0E26AC4FB03F5BE7E187DDFEFB914CD292A6FEDB7F70CE6B
-1
View File
@@ -1 +0,0 @@
3053020101300506032B6570042204206861FD53C7643DABDCDF4C3969CE44A156BAC261242A5AAEC140EDE510071C6CA12303210029CF90E6C1CF1ADC7105720303B2EE303412D2B682C6FEEF3D8736A286B2E27F
+1 -1
View File
@@ -1 +1 @@
308201360201003082011606062B0E070201013082010A02818100D18892CC35AD9E532C53810019E525CDE08882E6344D6787C366B171D68948F53D74F7923B148E0A0B4C9B956D695384DE24AC3034000B3C4AD4C8226470BBD88B5B053BCCB01E608B1352D6ED16324745253BDB204308E065368CB9D75ACDB290E671BD4CA1608500BFACD758E6E9EFAC8CCBAD83BE7E397A62E4F55634FC3B02818068C449661AD6CF299629C0800CF292E6F04441731A26B3C3E1B358B8EB44A47A9EBA7BC91D8A470505A64DCAB6B4A9C26F1256181A00059E256A641132385DEC45AD829DE6580F304589A96B768B1923A2929DED90218470329B465CEBAD66D9487338DEA650B042805FD66BAC7374F7D64665D6C1DF3F1CBD31727AAB1A7E1D0201030417021504ED7AED68B1A5EFDE11262210D9F1121D4A119CE8 3082018E028181008B333697371663F8869E3EC80A414E46BBAFE41F6D40E754A01ADA60FE7D12ACD16DE311C4115293114F6B92A54195909276380F04BCD4ED5CD993ED7F516DF7A752B928E5035E0D3A1A979A1CDE8387734338793C02001D59B662D4FC8F2BF0EABB1F553F9F46F57E74BCABCBA4E458812DB601FCD04609D435317181236B9702010202818038FBC56751763146BC107ECC59E9BAD3852EBC38799B41B40EF5745810BCF9DCC6D569B7E61063EA358B0DF2A194910029B72A9CFD11AD240681D3F976EDCB18D79C0530AB2944DC1E314C2B520BE23066C802754C19BF2EC15DE0439E2663383CEA5163DC857B6A5F91079F54FB47C9B33F23A9EB6B3FCBA8581524B3EC5C75028181008B333697371663F8869E3EC80A414E46BBAFE41F6D40E754A01ADA60FE7D12ACD16DE311C4115293114F6B92A54195909276380F04BCD4ED5CD993ED7F516DF7A752B928E5035E0D3A1A979A1CDE8387734338793C02001D59B662D4FC8F2BF0EABB1F553F9F46F57E74BC7F3EC6725F2FC0A6155ADCA43CEE7319E623824852
-1
View File
@@ -1 +0,0 @@
3081E0020101302C06072A8648CE3D0101022100FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF30440420FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC04205AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B0441046B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C2964FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5022100FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551020101
-1
View File
@@ -1 +0,0 @@
3081E0020101302C06072A8648CE3D0101022100FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF30440420FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC04205AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B0441046B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C2964FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5022100FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551020101
-1
View File
@@ -1 +0,0 @@
30820140020101303C06072A8648CE3D0101023100FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF30640430FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC0430B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF046104AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB73617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F023100FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973020101
-1
View File
@@ -1 +0,0 @@
308201AC020101304D06072A8648CE3D0101024201FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF308188044201FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC04420051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F000481850400C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650024201FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409020101
-1
View File
@@ -1 +0,0 @@
3081E0020101302C06072A8648CE3D0101022100FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF30440420FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC04205AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B0441046B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C2964FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5022100FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551020101
-1
View File
@@ -1 +0,0 @@
3081E0020101302C06072A8648CE3D0101022100FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF30440420FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC04205AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B0441046B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C2964FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5022100FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551020101
-1
View File
@@ -1 +0,0 @@
30820140020101303C06072A8648CE3D0101023100FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF30640430FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC0430B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF046104AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB73617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F023100FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973020101
-1
View File
@@ -1 +0,0 @@
308201AC020101304D06072A8648CE3D0101024201FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF308188044201FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC04420051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F000481850400C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650024201FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409020101
-77
View File
@@ -1,77 +0,0 @@
30 82 04 bd 02 01 00 30 0d 06 09 2a 86 48 86 f7
0d 01 01 01 05 00 04 82 04 a7 30 82 04 a3 02 01
00 02 82 01 01 00 d2 54 95 37 95 5e 3b f5 1e f0
29 dc d3 c7 b7 08 e8 a2 fe 84 ed 16 52 c9 cf 06
73 6b 1b 6d 5b 31 50 21 77 af d6 f9 bf ea 2a c3
ca 7d 52 58 f8 8d 12 bb c1 01 ac 19 7a 33 de 9e
52 91 a4 94 65 04 cb 34 dd 3b 5b 7b db c8 5e 1a
b4 91 48 c2 a1 fd 9e 10 9d a6 df 9f 63 70 e9 3c
ff fc 71 7b dc 08 97 00 64 8c ed 5a 78 ce 56 38
ee 0a 36 0d 4a 9f 3a b7 7f ea 38 9d 83 cd 4a fa
2c 92 fd ae 68 74 7d 25 4b 26 65 97 cc 21 43 ae
ec 6d 5b 90 ec ec 45 de fb f1 7e c3 58 95 a2 e7
e3 16 82 a4 a9 0b 77 05 7c d6 cd b8 95 d1 27 b5
db c5 33 63 f1 92 1c 3f 25 82 bf d1 8a 89 c4 65
c0 e9 07 e5 ba 17 b5 36 30 d7 a7 1c f3 bf 16 00
76 99 f1 d9 7c db 2b 52 ca c6 22 6d d6 ba 7f 16
27 f0 c1 ee 3f 8d ad 4a 69 48 41 57 8d 57 0e a8
a4 bb c6 3c 41 5d 7e 42 49 3b 3b 8d b5 b0 88 f3
2d 50 1b ec 0e ff 02 03 01 00 01 02 82 01 01 00
89 11 50 10 e2 09 80 3f 54 c3 24 34 e1 da d4 00
3d 43 03 64 f2 f0 ca 50 f3 d6 7b 5f 00 87 ba 97
1f 66 40 0e 5a a5 75 99 0f f7 7a 3d 43 6d f1 c4
55 c1 ff 9c ac 60 0a 10 45 72 9d d2 86 13 a2 e5
85 db d4 94 bb 20 b3 71 17 4a 86 03 ec 0b d2 ef
69 93 e0 79 80 5f e9 b9 0a 76 93 48 1b 58 a1 63
03 ac e0 da 2a 4f fc 4c 53 4a 54 6e 59 1d 3e 55
18 39 bf 65 8f 31 af 54 19 19 81 f4 e4 d7 44 ff
fe 73 2b 57 28 4b 2f 43 53 81 d2 b1 e0 ad a4 88
b2 11 ae d3 3a 7f e6 de c4 41 bb 22 07 1a 15 a7
c0 d6 b2 69 4d 01 c8 21 aa b8 9a 3b 3a ad 49 8d
ae 53 b3 8c b4 7f 2a 23 f4 0c 73 53 4f 2f c5 d5
1d 22 68 6a b9 31 0a 9c ba 79 59 12 e9 59 d4 1e
80 7a 2d 45 63 a1 89 2f 27 72 39 60 a3 5f 3e ef
26 47 63 42 ce 40 db 4d 26 01 ca 5e 00 5c 96 ef
77 48 7f 1d 09 45 99 d2 bb c2 ed d3 11 37 a1 91
02 81 81 00 f0 35 21 ff d4 d1 8f 13 ed bf 5f 87
43 37 31 25 03 fe bf be b7 81 da d1 d3 d5 36 e6
35 3d b5 77 eb 8e 86 73 12 e5 4a e7 0d a4 d4 66
7d df 44 bc 2f cb b4 71 65 bd 00 bc 29 2a 08 4f
35 78 31 59 98 56 e0 db 36 89 0a ca 0b ca 6c 94
07 de c9 a4 b4 18 a4 bf 92 92 78 c7 c1 69 da 18
80 ea e3 7c 9a 72 35 1c b3 6e a4 1d ab 5f ae 91
af a0 c9 0f 85 b8 b8 a9 c6 55 39 6e 91 75 c2 0f
8d 04 bf 79 02 81 81 00 e0 28 98 94 00 4a aa f1
a9 9b 17 cd 00 74 81 f6 b3 df e1 d3 98 ca 05 86
b2 e1 42 e4 81 92 df 10 cf c0 92 ec 9d 0b e1 b4
43 9d 9d 14 13 e1 29 78 5c f9 99 ee cb bf 09 09
c7 90 18 dd e6 3c db 38 b2 85 cf db 3f 3d fc 85
ed 78 1a 31 89 41 3c 39 0b ab fa 23 c8 95 c6 f2
a8 c1 ee 82 99 b6 bc 5e ea c6 ee 83 18 2a 27 29
22 d7 e3 34 da f1 e8 8c 82 f0 b5 3f a4 8b be 01
23 37 f3 4b 10 c7 4c 37 02 81 80 4c 18 e9 0e 7d
43 6e 4a 67 f5 4a b4 35 4d 14 da 9f 2b 63 5f 6e
0f 4b 5d 51 f8 a8 0d c2 2c 2c 83 33 32 d1 d1 3e
d9 39 23 7d a5 0c 4c f3 ef 79 7d 0c bf 42 08 f2
ac 2f c1 6c 61 0e 84 d9 71 9c 60 bf ec 36 0b fc
78 e9 dc 1c 64 22 85 bb 00 8f 6d 08 49 0e 58 4a
7c f0 9a 87 e1 9a e0 4c 67 1d 6e 6a 17 68 50 11
60 29 c9 e4 72 c9 81 09 dc ac 15 a8 cd 5e 63 1a
9c 01 37 d0 09 38 53 68 df 6a 31 02 81 80 4d 90
fe ab 48 26 8e 5c ad 8a 03 84 66 c1 ea 2f 0a 33
50 9b bd e5 3a 60 50 09 ee f1 cf 7c 99 3f e2 04
0b 53 61 4c b9 3f 7d 9e 4e ba a1 de 6a 51 42 2b
04 ff 42 f5 ca 14 de 3f 98 bb 40 6e 92 95 5e 01
3b d9 ec 5a 70 c5 8f 54 de 0b 82 29 56 c3 8e ac
66 14 77 d6 8c 4f 6f e2 1b bc 89 a0 58 32 a8 1f
4a 6d 86 b1 1f 77 f6 9c a9 fc a2 3e cf 6f bf e7
b7 70 5c 6a 16 c7 a1 fe 3c 6c 1f 54 37 a5 02 81
80 08 9d 30 ca da d1 af 53 16 e3 77 bf 9f 2b dd
38 a8 20 f9 e5 57 fb 7a cc 4e c6 0d d5 03 22 9f
f8 99 f5 61 69 88 3b 7b a7 c0 ca dd b2 1b b7 34
0b 5d ed 9f 37 fb 02 7d ef 01 2d 29 1d 75 9a ba
1a 5d 7b 77 47 e6 da b5 d7 a9 06 f2 61 5d 46 f9
6d c3 81 de 8f 5d 08 ac a6 b6 b3 51 7a 97 08 36
d3 d8 95 6b 08 e8 e3 10 24 61 67 97 c7 40 68 9e
b7 84 09 14 3f 95 02 3f 75 8b 8e b1 2c 80 b3 5f
03
-3
View File
@@ -2,11 +2,8 @@
00000000000000000000000000000000 d29d576fcea3a3a7ed9099f26d8c2871 563a8403ff5309d62370b1dcf5a11edd 00000000000000000000000000000000 d29d576fcea3a3a7ed9099f26d8c2871 563a8403ff5309d62370b1dcf5a11edd
ffeeddccbbaa99887766554433221100 1032547698badcfeefcdab8967452301 d5baa00a4bb9d8a7c981c8dc90d89d92 ffeeddccbbaa99887766554433221100 1032547698badcfeefcdab8967452301 d5baa00a4bb9d8a7c981c8dc90d89d92
ffeeddccbbaa99887766554433221100 145f0b8b663176b95dcab7e9dcd5cc24 1032547698badcfeefcdab8967452301 ffeeddccbbaa99887766554433221100 145f0b8b663176b95dcab7e9dcd5cc24 1032547698badcfeefcdab8967452301
80000000000000000000000000000000 00000000000000000000000000000000 264E5481EFF42A4606ABDA06C0BFDA3D
000000000000000000000000000000000000000000000000 d29d576fceaba3a7ed9899f2927bd78e 130e353e1037c22405e8faefb2c3c3e9 000000000000000000000000000000000000000000000000 d29d576fceaba3a7ed9899f2927bd78e 130e353e1037c22405e8faefb2c3c3e9
8899aabbccddeeffffeeddccbbaa99887766554433221100 1032547698badcfeefcdab8967452301 da860842b720802bf404a4c71034879a 8899aabbccddeeffffeeddccbbaa99887766554433221100 1032547698badcfeefcdab8967452301 da860842b720802bf404a4c71034879a
8899aabbccddeeffffeeddccbbaa99887766554433221100 b2696bd0d98c17953e4239225d27202c 1032547698badcfeefcdab8967452301 8899aabbccddeeffffeeddccbbaa99887766554433221100 b2696bd0d98c17953e4239225d27202c 1032547698badcfeefcdab8967452301
000102030405060708090A0B0C0D0E0F1011121314151617 4528CACCB954D450655E8CFD71CBFAC7 00112233445566778899AABBCCDDEEFF
0000000000000000000000000000000000000000000000000000000000000000 92074732d84e1841a013a0034c52bf50 81c4eb7b8ad9a8d0f2aa5d7bd626b560 0000000000000000000000000000000000000000000000000000000000000000 92074732d84e1841a013a0034c52bf50 81c4eb7b8ad9a8d0f2aa5d7bd626b560
00112233445566778899aabbccddeeffffeeddccbbaa99887766554433221100 1032547698badcfeefcdab8967452301 93df9a3cafe387bd999eebe393a17fca 00112233445566778899aabbccddeeffffeeddccbbaa99887766554433221100 1032547698badcfeefcdab8967452301 93df9a3cafe387bd999eebe393a17fca
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F 3DA46FFA6F4D6F30CD258333E5A61369 00112233445566778899AABBCCDDEEFF
-1
View File
@@ -1 +0,0 @@
302E020100300506032B656E0422042030D407BB0CC97D0EC493BDB00A4A8EFA06A50D2388F5BA62947030E7D9873F49
-1
View File
@@ -1 +0,0 @@
302E020100300506032B656E042204202818E54DE6B88EEF3E99E25042CB98E69373B222E4C1E8B3FB10AC9B26C1007B
-1
View File
@@ -1 +0,0 @@
3053020101300506032B656E04220420A00FADD6D29BE764B851F64F7620E80B700DF65914BED31E486362281BB5D061A123032100E9AD4CC54DAA36F312D98B253854F0076E2BC26FCE5802B3AC79A5B59B3D2C4F
-214
View File
@@ -1,214 +0,0 @@
// dump2def.cxx - Written and placed in public domain by Jeffrey Walton
// Create a module definitions file from a dumpbin file.
// dump2def can be used to create a list of exports from
// a static library. Then, the exports can used to build
// a dynamic link library with the same exports.
//
// If you wish to compile this source file using cl.exe, then:
// cl.exe /DNDEBUG /Oi /Oy /O2 /Zi /TP /GR /EHsc /MT dump2def.cxx
//
// The intended workflow in Crypto++ is:
//
// 1. Open a Developer Prompt
// 2. CD to cryptopp/ directory
// 3. nmake /f cryptest.nmake cryptopp.dll
//
// The cryptopp.dll recipe first builds cryptlib.lib. Then it calls
// dumpbin.exe to export all symbols from cryptlib.lib and writes them
// to cryptopp.dump. The recipe then calls dump2def.exe to create a
// module definition file. Finally, the recipe builds cryptopp.dll
// using the module definition file cryptopp.def. The linker creates
// the import lib cryptopp.lib and export cryptopp.exp automatically.
//
// This is only "half the problem solved" for those who wish to use
// a DLL. The program must import the import lib cryptopp.lib. Then
// the program must ensure the library headers export the symbol or
// class with CRYPTOPP_DLL. CRYPTOPP_DLL is only present on some classes
// because the FIPS module only allowed approved algorithms like AES and
// SHA. Other classes like Base64Encoder and HexEncoder lack CRYPTOPP_DLL.
//
// CRYPTOPP_DLL simply adds declspec(dllimport) when CRYPTOPP_IMPORTS is
// defined. The limitation of requiring declspec(dllimport) is imposed by
// Microsoft. Microsoft does not allow a program to "import everything".
//
// If you would like to read more about the FIPS module and the pain it
// causes then see https://www.cryptopp.com/wiki/FIPS_DLL. In fact we
// recommend you delete the CryptDll and DllTest projects from the
// Visual Studio solution file.
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <set>
// Friendly name
#define LIBRARY_DESC "Crypto++ Library"
typedef std::set<std::string> SymbolMap;
const int ErrorSuccess = 0;
const int ErrorDumpExtension = 1;
const int ErrorTooFewOpts = 2;
const int ErrorTooManyOpts = 3;
const int ErrorOpenInputFailed = 4;
const int ErrorOpenOutputFailed = 5;
const int ErrorReadException = 6;
const int ErrorWriteException = 7;
void PrintHelpAndExit(int code)
{
std::cout << "dump2def - create a module definitions file from a dumpbin file" << std::endl;
std::cout << " Written and placed in public domain by Jeffrey Walton" << std::endl;
std::cout << std::endl;
switch (code)
{
case ErrorDumpExtension:
std::cout << "Error: input file is missing \".dump\" extension.\n" << std::endl;
break;
case ErrorTooFewOpts:
std::cout << "Error: Too few options were supplied.\n" << std::endl;
break;
case ErrorTooManyOpts:
std::cout << "Error: Too many options were supplied.\n" << std::endl;
break;
case ErrorOpenInputFailed:
std::cout << "Error: Failed to open input file.\n" << std::endl;
break;
case ErrorOpenOutputFailed:
std::cout << "Error: Failed to open output file.\n" << std::endl;
break;
default:
;;
}
std::cout << "Usage: " << std::endl;
std::cout << " dump2def <infile>" << std::endl;
std::cout << " - Create a def file from <infile> and write it to a file with" << std::endl;
std::cout << " the same name as <infile> but using the .def extension" << std::endl;
std::cout << " dump2def <infile> <outfile>" << std::endl;
std::cout << " - Create a def file from <infile> and write it to <outfile>" << std::endl;
std::exit((code == ErrorSuccess ? 0 : 1));
}
int main(int argc, char* argv[])
{
// ******************** Handle Options ******************** //
// Convenience item
std::vector<std::string> opts;
for (size_t i=0; i<argc; ++i)
opts.push_back(argv[i]);
// Look for help
std::string opt = (opts.size() > 1 ? opts[1].substr(0,2) : "");
if (opt == "/h" || opt == "-h" || opt == "/?" || opt == "-?")
PrintHelpAndExit(ErrorSuccess);
// Add <outfile> as needed
if (opts.size() == 2)
{
std::string outfile = opts[1];
std::string::size_type pos = outfile.length() < 5 ? std::string::npos : outfile.length() - 5;
if (pos == std::string::npos || outfile.substr(pos) != ".dump")
PrintHelpAndExit(ErrorDumpExtension);
outfile.replace(pos, 5, ".def");
opts.push_back(outfile);
}
// Check or exit
if (opts.size() < 2)
PrintHelpAndExit(ErrorTooFewOpts);
if (opts.size() > 3)
PrintHelpAndExit(ErrorTooManyOpts);
// ******************** Read MAP file ******************** //
SymbolMap symbols;
try
{
std::ifstream infile(opts[1].c_str());
if (infile.is_open() == false)
PrintHelpAndExit(ErrorOpenInputFailed);
std::string::size_type pos;
std::string line;
// Find start of the symbol table
while (std::getline(infile, line))
{
pos = line.find("public symbols");
if (pos == std::string::npos) { continue; }
// Eat the whitespace after the table heading
infile >> std::ws;
break;
}
while (std::getline(infile, line))
{
// End of table
if (line.empty()) { break; }
std::istringstream iss(line);
std::string address, symbol;
iss >> address >> symbol;
symbols.insert(symbol);
}
}
catch (const std::exception& ex)
{
std::cerr << "Unexpected exception:" << std::endl;
std::cerr << ex.what() << std::endl;
std::cerr << std::endl;
PrintHelpAndExit(ErrorReadException);
}
// ******************** Write DEF file ******************** //
try
{
std::ofstream outfile(opts[2].c_str());
if (outfile.is_open() == false)
PrintHelpAndExit(ErrorOpenOutputFailed);
// Library name, cryptopp.dll
std::string name = opts[2];
std::string::size_type pos = name.find_last_of(".");
if (pos != std::string::npos)
name.erase(pos);
outfile << "LIBRARY " << name << std::endl;
outfile << "DESCRIPTION \"" << LIBRARY_DESC << "\"" << std::endl;
outfile << "EXPORTS" << std::endl;
outfile << std::endl;
outfile << "\t;; " << symbols.size() << " symbols" << std::endl;
// Symbols from our object files
SymbolMap::const_iterator it = symbols.begin();
for ( ; it != symbols.end(); ++it)
outfile << "\t" << *it << std::endl;
}
catch (const std::exception& ex)
{
std::cerr << "Unexpected exception:" << std::endl;
std::cerr << ex.what() << std::endl;
std::cerr << std::endl;
PrintHelpAndExit(ErrorWriteException);
}
return 0;
}
-7
View File
@@ -1,7 +0,0 @@
#include <cstddef>
int main(int argc, char* argv[])
{
enum {N = (sizeof(std::size_t) == 4 ? 4 : -1)};
int x[N];
return 0;
}
-7
View File
@@ -1,7 +0,0 @@
#include <cstddef>
int main(int argc, char* argv[])
{
enum {N = (sizeof(std::size_t) == 8 ? 8 : -1)};
int x[N];
return 0;
}
@@ -1,6 +0,0 @@
#include <arm_acle.h>
int main(int argc, char* argv[])
{
return 0;
}
-17
View File
@@ -1,17 +0,0 @@
#include <stdint.h>
#ifdef CRYPTOPP_ARM_NEON_HEADER
# include <arm_neon.h>
#endif
#ifdef CRYPTOPP_ARM_ACLE_HEADER
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
uint8x16_t x={0};
x=vaeseq_u8(x,x);
x=vaesmcq_u8(x);
x=vaesdq_u8(x,x);
x=vaesimcq_u8(x);
return 0;
}
-14
View File
@@ -1,14 +0,0 @@
#include <stdint.h>
#ifdef CRYPTOPP_ARM_NEON_HEADER
# include <arm_neon.h>
#endif
#ifdef CRYPTOPP_ARM_ACLE_HEADER
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
uint32x4_t x={0};
x=veorq_u32(x,x);
return 0;
}
-21
View File
@@ -1,21 +0,0 @@
#include <stdint.h>
#ifdef CRYPTOPP_ARM_NEON_HEADER
# include <arm_neon.h>
#endif
#ifdef CRYPTOPP_ARM_ACLE_HEADER
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
uint32_t w=0xffffffff;
w = __crc32w(w,w);
w = __crc32h(w,w);
w = __crc32b(w,w);
w = __crc32cw(w,w);
w = __crc32ch(w,w);
w = __crc32cb(w,w);
return 0;
}
-11
View File
@@ -1,11 +0,0 @@
#include <stdint.h>
#ifdef CRYPTOPP_ARM_NEON_HEADER
# include <arm_neon.h>
#endif
int main(int argc, char* argv[])
{
uint32x4_t x={0};
x=veorq_u32(x,x);
return 0;
}
@@ -1,6 +0,0 @@
#include <arm_neon.h>
int main(int argc, char* argv[])
{
return 0;
}
-20
View File
@@ -1,20 +0,0 @@
#include <stdint.h>
#ifdef CRYPTOPP_ARM_NEON_HEADER
# include <arm_neon.h>
#endif
#ifdef CRYPTOPP_ARM_ACLE_HEADER
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
const poly64_t a=0x60606060, b=0x90909090, c=0xb0b0b0b0;
const poly64x2_t d={0x60606060,0x90909090};
const poly8x16_t e={0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0};
const poly128_t r1 = vmull_p64(a, b);
const poly128_t r2 = vmull_high_p64(d, d);
return 0;
}
-16
View File
@@ -1,16 +0,0 @@
#include <stdint.h>
#ifdef CRYPTOPP_ARM_NEON_HEADER
# include <arm_neon.h>
#endif
#ifdef CRYPTOPP_ARM_ACLE_HEADER
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
uint32x4_t y = {0};
y=vsha1cq_u32(y,0,y);
y=vsha1mq_u32(y,1,y);
y=vsha1pq_u32(y,2,y);
return 0;
}
-16
View File
@@ -1,16 +0,0 @@
#include <stdint.h>
#ifdef CRYPTOPP_ARM_NEON_HEADER
# include <arm_neon.h>
#endif
#ifdef CRYPTOPP_ARM_ACLE_HEADER
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
uint32x4_t y = {0};
y=vsha256hq_u32(y, y, y);
y=vsha256h2q_u32(y, y, y);
y=vsha256su1q_u32(y, y, y);
return 0;
}
-27
View File
@@ -1,27 +0,0 @@
#include <stdint.h>
#ifdef CRYPTOPP_ARM_NEON_HEADER
# include <arm_neon.h>
#endif
#ifdef CRYPTOPP_ARM_ACLE_HEADER
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
// SM4 block cipher
uint32x4_t x;
x=vsm4ekeyq_u32(x,x);
x=vsm4eq_u32(x,x);
// SM3 hash
uint32x4_t y;
y=vsm3ss1q_u32(x,y,y);
y=vsm3tt1aq_u32(x,y,y,3);
y=vsm3tt1bq_u32(x,y,y,1);
y=vsm3tt2aq_u32(x,y,y,2);
y=vsm3tt2bq_u32(x,y,y,3);
y=vsm3partw1q_u32(x,y,y);
y=vsm3partw2q_u32(x,y,y);
return 0;
}
-27
View File
@@ -1,27 +0,0 @@
#include <stdint.h>
#ifdef CRYPTOPP_ARM_NEON_HEADER
# include <arm_neon.h>
#endif
#ifdef CRYPTOPP_ARM_ACLE_HEADER
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
// SM4 block cipher
uint32x4_t x;
x=vsm4ekeyq_u32(x,x);
x=vsm4eq_u32(x,x);
// SM3 hash
uint32x4_t y;
y=vsm3ss1q_u32(x,y,y);
y=vsm3tt1aq_u32(x,y,y,3);
y=vsm3tt1bq_u32(x,y,y,1);
y=vsm3tt2aq_u32(x,y,y,2);
y=vsm3tt2bq_u32(x,y,y,3);
y=vsm3partw1q_u32(x,y,y);
y=vsm3partw2q_u32(x,y,y);
return 0;
}
-21
View File
@@ -1,21 +0,0 @@
#include <stdint.h>
#ifdef CRYPTOPP_ARM_NEON_HEADER
# include <arm_neon.h>
#endif
#ifdef CRYPTOPP_ARM_ACLE_HEADER
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
// SM3 hash
uint32x4_t y;
y=vsm3ss1q_u32(x,y,y);
y=vsm3tt1aq_u32(x,y,y,3);
y=vsm3tt1bq_u32(x,y,y,1);
y=vsm3tt2aq_u32(x,y,y,2);
y=vsm3tt2bq_u32(x,y,y,3);
y=vsm3partw1q_u32(x,y,y);
y=vsm3partw2q_u32(x,y,y);
return 0;
}
-16
View File
@@ -1,16 +0,0 @@
#include <stdint.h>
#ifdef CRYPTOPP_ARM_NEON_HEADER
# include <arm_neon.h>
#endif
#ifdef CRYPTOPP_ARM_ACLE_HEADER
# include <arm_acle.h>
#endif
int main(int argc, char* argv[])
{
// SM4 block cipher
uint32x4_t x;
x=vsm4ekeyq_u32(x,x);
x=vsm4eq_u32(x,x);
return 0;
}
-31
View File
@@ -1,31 +0,0 @@
// Most Clang cannot handle mixed asm with positional arguments, where the
// body is Intel style with no prefix and the templates are AT&T style.
// Also see https://bugs.llvm.org/show_bug.cgi?id=39895 .
#include <cstddef>
int main(int argc, char* argv[])
{
size_t ret = 1, N = 1;
asm __volatile__
(
#if defined(__amd64__) || defined(__x86_64__)
".intel_syntax noprefix ;\n"
"xor rsi, rsi ;\n"
"neg %1 ;\n"
"inc %1 ;\n"
"push %1 ;\n"
"pop rax ;\n"
".att_syntax prefix ;\n"
: "=a" (ret) : "c" (N) : "%rsi"
#else
".intel_syntax noprefix ;\n"
"xor esi, esi ;\n"
"neg %1 ;\n"
"inc %1 ;\n"
"push %1 ;\n"
"pop eax ;\n"
".att_syntax prefix ;\n"
: "=a" (ret) : "c" (N) : "%esi"
#endif
);
return (int)ret;
}
-6
View File
@@ -1,6 +0,0 @@
#include <string>
int main(int argc, char* argv[])
{
unsigned int x=0;
return x;
}
-11
View File
@@ -1,11 +0,0 @@
// Real C++11 libraries provide <forward_list>
#include <forward_list>
int main(int argc, char* argv[])
{
#if __cplusplus >= 201103L
std::forward_list<int> x;
#else
int x[-1];
#endif
return 0;
}
@@ -1,5 +0,0 @@
int main(int argc, char* argv[])
{
alignas(8) unsigned char x[16];
return 0;
}
@@ -1,6 +0,0 @@
#include <cstddef>
int main (int argc, char* argv[])
{
std::size_t n = alignof(int);
return 0;
}
-10
View File
@@ -1,10 +0,0 @@
// https://en.cppreference.com/w/cpp/feature_test
int main(int argc, char* argv[])
{
#if __cpp_static_assert >= 200410L
int x[1];
#else
int x[-1];
#endif
return 0;
}
@@ -1,7 +0,0 @@
#include <atomic>
int main(int argc, char* argv[])
{
std::atomic_flag f = ATOMIC_FLAG_INIT;
std::atomic<bool> g (false);
return 0;
}
-5
View File
@@ -1,5 +0,0 @@
int main(int argc, char* argv[])
{
auto a = 1 + 2;
return 0;
}
@@ -1,10 +0,0 @@
constexpr int fact(int n)
{
return n <= 1 ? 1 : (n * fact(n - 1));
}
int main(int argc, char* argv[])
{
fact(4);
return 0;
}
@@ -1,10 +0,0 @@
struct S {
S() = delete;
explicit S(int n) { }
};
int main (int argc, char* rgv[])
{
S s(1);
return 0;
}
@@ -1,7 +0,0 @@
#include <cstddef>
int main(int argc, char* argv[])
{
enum Size : std::size_t { Zero=0, One=1, Two=2 };
Size s(Size::Zero);
return 0;
}
@@ -1,6 +0,0 @@
#include <vector>
int main(int argc, char* argv[])
{
std::vector<int> v{0,1,2,3,4};
return 0;
}
-10
View File
@@ -1,10 +0,0 @@
// https://en.cppreference.com/w/cpp/feature_test
int main(int argc, char* argv[])
{
#if __cpp_lambdas >= 200907L
int x[1];
#else
int x[-1];
#endif
return 0;
}
@@ -1,29 +0,0 @@
#if defined(__GNUC__)
# define GNUC_VERSION (__GNUC__*1000 + __GNUC_MINOR__*10)
#endif
#if defined(__clang__) && defined(__apple_build_version__)
# undef GNUC_VERSION
# define APPLE_VERSION (__clang_major__*1000 + __clang_minor__*10)
#elif defined(__clang__)
# undef GNUC_VERSION
# define LLVM_VERSION (__clang_major__*1000 + __clang_minor__*10)
#endif
#if (GNUC_VERSION >= 7030)
# pragma GCC diagnostic ignored "-Wterminate"
#endif
#include <stdexcept>
void f(int n) noexcept(false)
{
if (n > 2)
throw std::runtime_error("Oops");
}
int main(int argc, char* argv[])
{
f(argc);
return 0;
}
@@ -1,6 +0,0 @@
#include <cstddef>
int main(int argc, char* argv[])
{
int* p = nullptr;
return 0;
}
@@ -1,11 +0,0 @@
// https://en.cppreference.com/w/cpp/feature_test
// Apple bug https://bugs.llvm.org/show_bug.cgi?id=47012.
int main(int argc, char* argv[])
{
#if __cpp_threadsafe_static_init >= 200806L
int x[1];
#else
int x[-1];
#endif
return 0;
}
-7
View File
@@ -1,7 +0,0 @@
#include <mutex>
int main(int argc, char* argv[])
{
std::mutex m;
std::lock_guard<std::mutex> l(m);
return 0;
}
@@ -1,9 +0,0 @@
int main(int argc, char* argv[])
{
#if __cpp_variadic_templates >= 200704L
int x[1];
#else
int x[-1];
#endif
return 0;
}
-9
View File
@@ -1,9 +0,0 @@
int main(int argc, char* argv[])
{
#if __cplusplus >= 201402L
int x[1];
#else
int x[-1];
#endif
return 0;
}
-9
View File
@@ -1,9 +0,0 @@
int main(int argc, char* argv[])
{
#if __cplusplus >= 201703L
int x[1];
#else
int x[-1];
#endif
return 0;
}
-10
View File
@@ -1,10 +0,0 @@
// https://en.cppreference.com/w/cpp/feature_test
int main(int argc, char* argv[])
{
#if __cpp_static_assert >= 201411L
int x[1];
#else
int x[-1];
#endif
return 0;
}
@@ -1,11 +0,0 @@
// https://en.cppreference.com/w/cpp/feature_test
#include <exception>
int main(int argc, char* argv[])
{
#if __cpp_lib_uncaught_exceptions >= 201411L
int x = std::uncaught_exceptions();
#else
int x[-1];
#endif
return 0;
}
@@ -1,12 +0,0 @@
#include <exception>
struct S {
S() {}
virtual ~S() {
bool b = std::uncaught_exception();
}
};
int main(int argc, char* argv[])
{
S s;
return 0;
}
-8
View File
@@ -1,8 +0,0 @@
#include <string>
int main(int argc, char* argv[])
{
#ifndef __GLIBCXX__
int x[-1];
#endif
return 0;
}
-8
View File
@@ -1,8 +0,0 @@
#include <string>
int main(int argc, char* argv[])
{
#ifndef __NEWLIB__
int x[-1];
#endif
return 0;
}
-26
View File
@@ -1,26 +0,0 @@
#include <altivec.h>
int main(int argc, char* argv[])
{
#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
__vector unsigned char x = {1,2,3,4,5,6,7,8};
x=__vcipher(x,x);
x=__vcipherlast(x,x);
x=__vncipher(x,x);
x=__vncipherlast(x,x);
#elif defined(__clang__)
__vector unsigned long long x = {1,2};
x=__builtin_altivec_crypto_vcipher(x,x);
x=__builtin_altivec_crypto_vcipherlast(x,x);
x=__builtin_altivec_crypto_vncipher(x,x);
x=__builtin_altivec_crypto_vncipherlast(x,x);
#elif defined(__GNUC__)
__vector unsigned long long x = {1,2};
x=__builtin_crypto_vcipher(x,x);
x=__builtin_crypto_vcipherlast(x,x);
x=__builtin_crypto_vncipher(x,x);
x=__builtin_crypto_vncipherlast(x,x);
#else
int XXX[-1];
#endif
return 0;
}
-13
View File
@@ -1,13 +0,0 @@
#define GNUC_VERSION (__GNUC__*1000 + __GNUC_MAJOR__*10)
#if (GNUC_VERSION >= 4060) || defined(__clang__)
# pragma GCC diagnostic ignored "-Wdeprecated"
#endif
#include <altivec.h>
int main(int argc, char* argv[])
{
__vector unsigned char x;
x=vec_ld(0, (unsigned char*)argv[0]);
x=vec_add(x,x);
return 0;
}
-44
View File
@@ -1,44 +0,0 @@
#if defined(__GNUC__)
# define GNUC_VERSION (__GNUC__*1000 + __GNUC_MINOR__*10)
#endif
#if defined(__clang__) && defined(__apple_build_version__)
# undef GNUC_VERSION
# define APPLE_VERSION (__clang_major__*1000 + __clang_minor__*10)
#elif defined(__clang__)
# undef GNUC_VERSION
# define LLVM_VERSION (__clang_major__*1000 + __clang_minor__*10)
#endif
#if (GNUC_VERSION >= 4060) || (LLVM_VERSION >= 1070) || (APPLE_VERSION >= 2000)
# pragma GCC diagnostic ignored "-Wdeprecated"
#endif
// XL C++ on AIX does not define VSX and does not
// provide an option to set it. We have to set it
// for the code below. This define must stay in
// sync with the define in test_ppc_power7.cxx.
#if defined(_AIX) && defined(_ARCH_PWR7) && defined(__xlC__)
# define __VSX__ 1
#endif
#include <altivec.h>
int main(int argc, char* argv[])
{
#if defined(_ARCH_PWR7) && defined(__VSX__)
// PWR7
__vector unsigned int a = {1,2,3,4};
__vector unsigned int b = vec_ld(0, (unsigned int*)argv[0]);
__vector unsigned int c = vec_xor(a, b);
// VSX
__vector unsigned int x = {5,6,7,8};
__vector unsigned int y = vec_xl(0, (unsigned int*)argv[0]);
__vector unsigned int z = vec_xor(x, y);
__vector unsigned long long xx = {1,2};
__vector unsigned long long yy = (__vector unsigned long long)y;
#else
int x[-1];
#endif
return 0;
}
-46
View File
@@ -1,46 +0,0 @@
#if defined(__GNUC__)
# define GNUC_VERSION (__GNUC__*1000 + __GNUC_MINOR__*10)
#endif
#if defined(__clang__) && defined(__apple_build_version__)
# undef GNUC_VERSION
# define APPLE_VERSION (__clang_major__*1000 + __clang_minor__*10)
#elif defined(__clang__)
# undef GNUC_VERSION
# define LLVM_VERSION (__clang_major__*1000 + __clang_minor__*10)
#endif
#if (GNUC_VERSION >= 4060) || (LLVM_VERSION >= 1070) || (APPLE_VERSION >= 2000)
# pragma GCC diagnostic ignored "-Wdeprecated"
#endif
// XL C++ on AIX does not define CRYPTO and does not
// provide an option to set it. We have to set it
// for the code below. This define must stay in
// sync with the define in test_ppc_power8.cxx
#if defined(_AIX) && defined(_ARCH_PWR8) && defined(__xlC__)
# define __CRYPTO__ 1
#endif
#include <altivec.h>
int main(int argc, char* argv[])
{
#if defined(_ARCH_PWR8)
__vector unsigned long long r = {1, 2};
__vector unsigned int s = vec_xl(0, (unsigned int*)argv[0]); // Power7
__vector unsigned long long w = (__vector unsigned long long)r;
__vector unsigned long long x = (__vector unsigned long long)s;
__vector unsigned long long y = vec_xor(w, x);
__vector unsigned long long z = vec_add(y, vec_add(w, x));
# if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
__vector unsigned long long u = __vpmsumd (y, z);
# elif defined(__clang__)
__vector unsigned long long u = __builtin_altivec_crypto_vpmsumd (y, z);
# else
__vector unsigned long long u = __builtin_crypto_vpmsumd (y, z);
# endif
#else
int x[-1];
#endif
return 0;
}
-33
View File
@@ -1,33 +0,0 @@
#if defined(__GNUC__)
# define GNUC_VERSION (__GNUC__*1000 + __GNUC_MINOR__*10)
#endif
#if defined(__clang__) && defined(__apple_build_version__)
# undef GNUC_VERSION
# define APPLE_VERSION (__clang_major__*1000 + __clang_minor__*10)
#elif defined(__clang__)
# undef GNUC_VERSION
# define LLVM_VERSION (__clang_major__*1000 + __clang_minor__*10)
#endif
#if (GNUC_VERSION >= 4060) || (LLVM_VERSION >= 1070) || (APPLE_VERSION >= 2000)
# pragma GCC diagnostic ignored "-Wdeprecated"
#endif
#include <altivec.h>
int main(int argc, char* argv[])
{
#if defined(_ARCH_PWR9)
__vector unsigned int v = vec_xl_be(0, (unsigned int*)argv[0]);
#else
int XXX[-1];
#endif
#if defined(__GNUC__) || defined(__IBM_GCC_ASM)
unsigned int y = __builtin_darn_32();
#else
int XXX[-1];
#endif
return 0;
}
-23
View File
@@ -1,23 +0,0 @@
#include <altivec.h>
int main(int argc, char* argv[])
{
#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
__vector unsigned int x = {1,2,3,4};
x=__vshasigmaw(x, 0, 0);
__vector unsigned long long y = {1,2};
y=__vshasigmad(y, 0, 0);
#elif defined(__clang__)
__vector unsigned int x = {1,2,3,4};
x=__builtin_altivec_crypto_vshasigmaw(x, 0, 0);
__vector unsigned long long y = {1,2};
y=__builtin_altivec_crypto_vshasigmad(y, 0, 0);
#elif defined(__GNUC__)
__vector unsigned int x = {1,2,3,4};
x=__builtin_crypto_vshasigmaw(x, 0, 0);
__vector unsigned long long y = {1,2};
y=__builtin_crypto_vshasigmad(y, 0, 0);
#else
int XXX[-1];
#endif
return 0;
}
-17
View File
@@ -1,17 +0,0 @@
#include <altivec.h>
int main(int argc, char* argv[])
{
__vector unsigned long long x = {1,2};
__vector unsigned long long y = {3,4};
#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
__vector unsigned long long z=__vpmsumd(x,y);
#elif defined(__clang__)
__vector unsigned long long z=__builtin_altivec_crypto_vpmsumd(x,y);
#elif defined(__GNUC__)
__vector unsigned long long z=__builtin_crypto_vpmsumd(x,y);
#else
int XXX[-1];
#endif
return 0;
}
-15
View File
@@ -1,15 +0,0 @@
#include <string>
#include <pthread.h>
void* function(void *ptr)
{
return 0;
}
int main(int argc, char* argv[])
{
pthread_t thread;
int ret = pthread_create(&thread, NULL, function, (void*)0);
pthread_join(thread, NULL);
return 0;
}
-11
View File
@@ -1,11 +0,0 @@
#include <emmintrin.h>
#include <wmmintrin.h>
int main(int argc, char* argv[])
{
__m128i x = _mm_setzero_si128();
x=_mm_aesenc_si128(x,x);
x=_mm_aesenclast_si128(x,x);
x=_mm_aesdec_si128(x,x);
x=_mm_aesdeclast_si128(x,x);
return 0;
}
-7
View File
@@ -1,7 +0,0 @@
#include <immintrin.h>
int main(int argc, char* argv[])
{
__m256d x = _mm256_setzero_pd();
x=_mm256_addsub_pd(x,x);
return 0;
}
-9
View File
@@ -1,9 +0,0 @@
#include <immintrin.h>
int main(int argc, char* argv[])
{
// _mm256_broadcastsi128_si256 due to Clang
__m128i x = _mm_setzero_si128 ();
__m256i y = _mm256_broadcastsi128_si256 (x);
y = _mm256_add_epi64 (y,y);
return 0;
}
-8
View File
@@ -1,8 +0,0 @@
#include <stdint.h>
#include <immintrin.h>
int main(int argc, char* argv[])
{
uint64_t x[8] = {0};
__m512i y = _mm512_loadu_si512((__m512i*)x);
return 0;
}
-8
View File
@@ -1,8 +0,0 @@
#include <emmintrin.h>
#include <wmmintrin.h>
int main(int argc, char* argv[])
{
__m128i x = _mm_setzero_si128();
x=_mm_clmulepi64_si128(x,x,0x11);
return 0;
}
-7
View File
@@ -1,7 +0,0 @@
int main(int argc, char* argv[])
{
unsigned int a, b, c, d;
asm volatile ( "cpuid" : "+a"(a), "=b"(b), "+c"(c), "=d"(d) );
return 0;
}
-10
View File
@@ -1,10 +0,0 @@
#include <immintrin.h>
#if (__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6))
# include <x86intrin.h>
#endif
int main(int argc, char* argv[])
{
unsigned int x=0;
(void)_rdrand32_step (&x);
return x == 0 ? 0 : 0;
}

Some files were not shown because too many files have changed in this diff Show More