| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
ok visa@
|
|
|
|
| |
OK visa@
|
|
|
|
| |
ok djm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by pre-allocating two cryptodesc objects and storing them in an array
instead of a linked list. If more than two cryptodesc objects are
required use mallocarray to fetch them. Adapt the drivers to the new
API.
This change results in one pool-get per ESP packet instead of three.
It also simplifies softraid crypto where more cryptodesc objects are
allocated than used.
From, with and ok markus@, ok bluhm@
"looks sane" mpi@
|
|
|
|
|
|
| |
(in swcr_authenc())
ok mikeb@, who pointed out that I'd missed uio
|
|
|
|
| |
accelerator drivers. No longer used by anything. ok sthen@ mikeb@
|
| |
|
| |
|
| |
|
|
|
|
| |
ok naddy, jsing, reyk
|
|
|
|
| |
No change for GCM, however upcoming changes will rely on this.
|
| |
|
|
|
|
|
|
|
| |
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
| |
|
| |
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
|
|
| |
rather than requiring each algorithm to provide their own memory handling.
This matches the interface already provided by cryptosoft for
authentication algorithms and removes the need for zerokey functions.
ok mikeb@
|
|
|
|
|
|
| |
with ESN AAD is 12 bytes long so it's faster to zero out 4
bytes than to copy 12. Without ESN it's either copying or
zeroing out 8 bytes but we'll rely on the cache locality here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Number are provided to the GCM as an Additional Authenticated
Data. Usually an SPI and a lower 32-bit part of the ESN are
contained within the same memory buffer whereas an upper part
of the ESN comes from an external location. To accommodate
that RFC 4303, Section 3.3.2.1 states that upper part of the
ESN is hashed in the end. Unfortunately this advice is not
applicable for the combined authentication/encryption modes
and RFC 4106 decided not to follow that advice, effectively
requiring large API changes to accommodate that poor choice.
For now implement a kludge that will take an effect in case
CRD_F_ESN flag is set in the crypto operation descriptor.
Successfully tested against Linux 3.2 with strongSwan 4.6.4.
|
|
|
|
|
| |
supply correct AAD length to the final round of hashing.
While here rename swcr_combined to swcr_authenc.
|
|
|
|
|
|
| |
Part of the work to remove -Wno-uninitialized.
ok mikeb@
|
|
|
|
|
|
|
|
|
|
|
|
| |
in RFC4302 and RFC4303. Right now only software crypto engine is
capable of doing it.
Replay check was rewritten to implement algorithm described in the
Appendix A of RFC4303 and the window size was increased to 64.
Tested against OpenBSD, Linux (strongswan) and Windows.
No objection from the usual suspects.
|
|
|
|
|
|
| |
to cuio_copydata() and make sure we don't loop forever if the end of
an iov matches the cipher block boundary.
ok mikeb, deraadt
|
|
|
|
| |
ok mikeb
|
| |
|
|
|
|
|
| |
explicit_bzero() where required
ok markus mikeb
|
|
|
|
| |
ok mikeb
|
|
|
|
|
| |
instead save one bcopy() per block by alternating between two iv buffers;
ok mikeb@
|
|
|
|
|
|
|
|
|
|
|
| |
There's not much use for the declassified cipher from the 80's
with a questionable license these days. According to the FIPS
drafts, Skipjack reaches its EOL in December 2010.
The libc portion will be removed after the ports hackathon.
djm and thib agree, no objections from deraadt
Thanks to jsg for digging up FIPS drafts.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
described in FIPS SP 800-38D.
This implementation supports 16 byte authentication tag only,
splitting transformation into two parts: encryption and
authentication. Encryption is handled by the existing
AES-CTR implementation, while authentication requires new
AES_GMAC hash function.
Additional routine is added to the software crypto driver
to deal with peculiarities of a combined authentication-
encryption transformation.
With suggestions from reyk, naddy and toby.
|
|
|
|
|
|
|
|
|
| |
are required to detect that.
Change the function to take a wait argument (used in nfs server, but
M_NOWAIT everywhere else for now) and to return an error
ok claudio@ henning@ krw@
|
|
|
|
|
|
| |
sysctl.h was reliant on this particular include, and many drivers included
sysctl.h unnecessarily. remove sysctl.h or add proc.h as needed.
ok deraadt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(1) use correct (message) block size of 128 byte (instead of 64
bytes) for HMAC-SHA512/384 (RFC4634).
(2) RFC4868 specifies that HMAC-SHA-{256,384,512} is truncated to
nnn/2 bits, while we still use 96 bits. 96 bits have been
specified in draft-ietf-ipsec-ciph-sha-256-00 while
draft-ietf-ipsec-ciph-sha-256-01 changed it to 128 bits.
WARNING: this change makes IPsec with SHA-256 (the default)
incompatible with older OpenBSD versions and other IPsec-implementations
that share this bug.
ok+tests naddy, fries; requested by reyk/deraadt
|
|
|
|
|
|
|
|
| |
XTS is a "tweaked" AES mode that has properties that are desirable
for block device encryption and it is specified in the IEEE
P1619-2007 standard for this purpose.
prodded by & ok hshoexer@
|
|
|
|
| |
ok deraadt@
|
|
|
|
|
|
| |
"MALLOC(*swd, ...)" vs. "swd = malloc(..."
ok millert
|
|
|
|
| |
error spotting and ok krw@
|
|
|
|
|
|
| |
to match.
ok deraadt@
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
number of key bits is supplied.
Only AES and DES/3DES might fail.
ok and help markus@
|
|
|
|
|
|
| |
This moves md5.c out of libkern and into sys/crypto where it belongs (as
requested by markus@). Note that md5.c is still mandatory (dev/rnd.c uses it).
Verified with IPsec + hmac-md5 and tcp md5sig. OK henning@ and hshoexer@
|
| |
|
| |
|
|
|
|
| |
the switch.
|
|
|
|
|
|
| |
- simplistic load balancing across multiple cards
- simplified registration process
- a few style nits.
|
|
|
|
|
| |
bandwidth of the kernel API). It's only available from userland and
then only if kern.cryptodevallowsoft=1.
|