Tobias Brunner
94cbd6469a
bliss: Fix build with DEBUG_LEVEL < 2
2023-05-08 17:32:17 +02:00
Tobias Brunner
48e9267d7a
cred-encoding: Avoid potential use after free when caching encodings
...
The pattern currently is to call get_cache(), generate the encoding
if that failed and then store it with cache(). The latter adopts the
passed encoding and frees any stored encoding. However, the latter means
that if two threads concurrently fail to get a cached encoding and then
both generate and store one, one of the threads might use an encoding
that was freed by the other thread.
Since encodings are not expected to change, we can avoid this issue by
not replacing an existing cache entry and instead return that (while
freeing the passed value instead of the cached one).
Closes strongswan/strongswan#1231
2022-09-20 09:53:13 +02:00
Tobias Brunner
19ef2aec15
Update copyright headers after acquisition by secunet
2022-06-28 10:22:56 +02:00
Andreas Steffen
4abb29f639
credentials: Added void *params to public_key encrypt() and private_key decrypt() methods
2021-11-09 17:58:28 +01:00
Josh Soref
b3ab7a48cc
Spelling fixes
...
* accumulating
* acquire
* alignment
* appropriate
* argument
* assign
* attribute
* authenticate
* authentication
* authenticator
* authority
* auxiliary
* brackets
* callback
* camellia
* can't
* cancelability
* certificate
* choinyambuu
* chunk
* collector
* collision
* communicating
* compares
* compatibility
* compressed
* confidentiality
* configuration
* connection
* consistency
* constraint
* construction
* constructor
* database
* decapsulated
* declaration
* decrypt
* derivative
* destination
* destroyed
* details
* devised
* dynamic
* ecapsulation
* encoded
* encoding
* encrypted
* enforcing
* enumerator
* establishment
* excluded
* exclusively
* exited
* expecting
* expire
* extension
* filter
* firewall
* foundation
* fulfillment
* gateways
* hashing
* hashtable
* heartbeats
* identifier
* identifiers
* identities
* identity
* implementers
* indicating
* initialize
* initiate
* initiation
* initiator
* inner
* instantiate
* legitimate
* libraries
* libstrongswan
* logger
* malloc
* manager
* manually
* measurement
* mechanism
* message
* network
* nonexistent
* object
* occurrence
* optional
* outgoing
* packages
* packets
* padding
* particular
* passphrase
* payload
* periodically
* policies
* possible
* previously
* priority
* proposal
* protocol
* provide
* provider
* pseudo
* pseudonym
* public
* qualifier
* quantum
* quintuplets
* reached
* reading
* recommendation to
* recommendation
* recursive
* reestablish
* referencing
* registered
* rekeying
* reliable
* replacing
* representing
* represents
* request
* request
* resolver
* result
* resulting
* resynchronization
* retriable
* revocation
* right
* rollback
* rule
* rules
* runtime
* scenario
* scheduled
* security
* segment
* service
* setting
* signature
* specific
* specified
* speed
* started
* steffen
* strongswan
* subjectaltname
* supported
* threadsafe
* traffic
* tremendously
* treshold
* unique
* uniqueness
* unknown
* until
* upper
* using
* validator
* verification
* version
* version
* warrior
Closes strongswan/strongswan#164 .
2020-02-11 18:23:07 +01:00
Tobias Brunner
667e74d60a
bliss: Fix compilation with non-GNU C libraries
...
Not even the glibc man page mentions that type.
Fixes #2638 .
2018-05-14 15:51:42 +02:00
Tobias Brunner
de280c2e03
private-key: Add optional parameters argument to sign() method
2017-11-08 16:48:10 +01:00
Andreas Steffen
a3a8b4acae
bliss: bliss_sampler expects XOF type
2016-09-22 09:23:47 +02:00
Andreas Steffen
188b190a70
mgf1: Refactored MGF1 as an XOF
2016-09-21 06:40:52 +02:00
Andreas Steffen
17e4ca6ac9
integrity-test: Added bliss_param_sets to read-only segment
2016-07-29 12:36:15 +02:00
Andreas Steffen
d305f251a5
Created libnttfft
...
This makes Number Theoretic Transforms (NTT) based on the efficient
Fast-Fourier-Transform (FFT) available to multiple plugins.
2016-07-29 12:36:15 +02:00
Andreas Steffen
a7d626118f
bliss: Implemented FFT with fast Montgomery arithmetic
2016-07-29 12:36:14 +02:00
Andreas Steffen
a88d958933
Explicitly mention SHA2 algorithm in BLISS OIDs and signature schemes
2015-11-06 14:55:31 +01:00
Andreas Steffen
f6fede934b
Support BLISS signatures with SHA-3 hash
2015-11-03 21:35:09 +01:00
Andreas Steffen
e57190c312
Use MGF1 with SHA-512 as BLISS random oracle
2015-07-27 22:09:08 +02:00
Andreas Steffen
03b4d11ace
Fixed compiler warnings
2015-02-27 08:44:16 +01:00
Andreas Steffen
27bd0fed93
Allow SHA256 and SHA384 data hash for BLISS signatures.
...
The default is SHA512 since this hash function is also
used for the c_indices random oracle.
2015-02-26 08:56:12 +01:00
Andreas Steffen
bfb708ea23
Check for null pointer before applying memwipe()
2015-02-25 21:45:34 +01:00
Andreas Steffen
c2aca9eed2
Implemented improved BLISS-B signature algorithm
2015-02-25 21:45:34 +01:00
Tobias Brunner
a8e82ace8a
bliss: Make sure sampler exists after checking for it earlier
2014-12-23 15:40:01 +01:00
Andreas Steffen
9b4e411c50
Also initialize s_sign
2014-12-12 13:24:11 +01:00
Andreas Steffen
8aaf36c6e3
Fix ambiguities and gcc compiler warning
2014-12-12 12:48:31 +01:00
Andreas Steffen
83447555a6
Use Huffman code in BLISS signature
2014-12-12 12:00:20 +01:00
Tobias Brunner
f55a03a2de
bliss: Fix compilation warning with certain GCC versions
...
Theoretically, n could be zero and these variables are then used
uninitialized. Older GCC versions warn about this and on Travis where we
compile with -Werror this causes the tests to fail.
2014-12-12 12:00:20 +01:00
Andreas Steffen
443346f56a
Pack private key arrays
2014-12-10 22:45:30 +01:00
Andreas Steffen
0d8a3f5d01
Applied bit packing to BLISS public key
2014-11-29 14:51:18 +01:00
Andreas Steffen
bf749fa1fb
Wipe BLISS private key memory
2014-11-29 14:51:17 +01:00
Andreas Steffen
5a50e364e6
Store NTT A of BLISS public key a
2014-11-29 14:51:17 +01:00
Andreas Steffen
e71813e56d
Finished BLISS signature generation
2014-11-29 14:51:17 +01:00
Andreas Steffen
edd72b6bb9
Implemented Gaussian rejection sampler
...
The bliss_sampler class uses the mgf1_bitspender as a
pseudo-random source.
2014-11-29 14:51:16 +01:00
Andreas Steffen
f673966b9f
Started implementing BLISS signature generation
2014-11-29 14:51:16 +01:00
Andreas Steffen
56009f2001
Store and parse BLISS private and public keys in DER and PEM format
...
Additionally generate SHA-1 fingerprints of raw BLISS subjectPublicKey
and subjectPublicKeyInfo objects.
Some basic functions used by the bliss_public_key class are shared
with the bliss_private_key class.
2014-11-29 14:51:16 +01:00
Andreas Steffen
64a5cacde5
Use mgf1_bitspender to generate random secret key
2014-11-29 14:51:15 +01:00
Andreas Steffen
73a327404d
Defined BLISS I and IV parameter sets
2014-11-29 14:51:14 +01:00
Andreas Steffen
8c751b6119
Implemented Number Theoretic Transform using the FFT algorithm
...
By pre-multiplying the input arrays with a linear phase the
fast multiplication via FFT and inverse FFT computes a negative
wrapped convolution corresponding to a modulus of x^n+1.
2014-11-29 14:51:14 +01:00
Andreas Steffen
9d5b91d198
Created framework for BLISS post-quantum signature algorithm
2014-11-29 14:51:14 +01:00