sphincs / sphincs-256 Goto Github PK
View Code? Open in Web Editor NEWReference and AVX2 optimized implementations of SPHINCS-256, accompanying the EUROCRYPT 2015 paper "SPHINCS: practical stateless hash-based signatures"
Reference and AVX2 optimized implementations of SPHINCS-256, accompanying the EUROCRYPT 2015 paper "SPHINCS: practical stateless hash-based signatures"
Hello. guys!
I'm trying to build those source files to .so shared libs to use it in Golang, but have some issues.
Here is my Makefile
# Compiler settings
CC := gcc
CFLAGS := -std=c99 -no-pie -mavx2 -g -O3 -Wall -Wextra -Werror -fPIC -Wno-error=sign-compare -Wno-error=unused-parameter
ASMFLAGS := -fPIC
# Directories
SRCDIR := source/avx2
OBJDIR := obj
LIBDIR := lib
# Source files
CFILES := $(wildcard $(SRCDIR)/*.c)
SFILES := $(wildcard $(SRCDIR)/*.s)
# Object files
COBJECTS := $(patsubst $(SRCDIR)/%.c, $(OBJDIR)/%.o, $(CFILES))
SOBJECTS := $(patsubst $(SRCDIR)/%.s, $(OBJDIR)/%.o, $(SFILES))
# Shared library name
LIBRARY := libavx2.so
all: $(LIBDIR)/$(LIBRARY)
# Compile C files
$(OBJDIR)/%.o: $(SRCDIR)/%.c
$(CC) $(CFLAGS) -c -o $@ $<
# Assemble S files
$(OBJDIR)/%.o: $(SRCDIR)/%.s
$(CC) $(ASMFLAGS) -c -o $@ $<
# Build shared library
$(LIBDIR)/$(LIBRARY): $(COBJECTS) $(SOBJECTS)
$(CC) -shared -Wl,-Bsymbolic-functions -Wl,-z,relro -o $@ $^
clean:
rm -f $(OBJDIR)/*.o
rm -f $(LIBDIR)/$(LIBRARY)
But when I run it, I have next errors:
/usr/bin/ld: obj/genfullchain8x.o: relocation R_X86_64_32S against symbol
_rotate8' can not be used when making a shared object; recompile with -fPIC`
As you can see, I'm building .s files with flag -fPIC but the compiler still tells me that there is an issue.
Can you help me with it?
Would be awesome if you add some instruction and tech specs to your README how to use your library.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.