summaryrefslogtreecommitdiff
path: root/sys/dev/pci/ubsec.c
AgeCommit message (Collapse)Author
2002-12-06Don't use the RNG oscillator output directly, use the sha1'd version (theJason Wright
the direct data does not pass 1/2 of the FIPS140-2 tests with any degree of regularity).
2002-12-05Treat RNGSHA1 operations the same as RNGBYPASS for callback purposes (theyJason Wright
produce the same size/format data).
2002-11-21From Angelos:Jason Wright
- simplistic load balancing across multiple cards - simplified registration process - a few style nits.
2002-11-19Add a simplistic table driven lookup routine and use it where appropriate.Jason Wright
2002-10-12Remove more '\n's from panic() statements. Both trailing and leading.Kenneth R Westerback
Diff generated by Chris Kuethe.
2002-10-10Match the Sun Crypto Adapter 1000, it appears to be a broadcom 5821.Jason Wright
2002-10-05match 5822Jason Wright
2002-09-24Don't use constants for the output parameter, use the iparam count as a ↵Jason Wright
pointer to the first result location.
2002-09-19remember: bits is bits and bytes is bytes... use -byte- count for bcopy notJason Wright
bits. Also, the conversion between bits and bytes involves a division by 8 not 2. (The latter pointed out by Francis Cianfrocca <vze32r6m@verizon.net>)
2002-09-12- Split out the hardware and software normalization versions of modexp...Jason Wright
I screwed something up when the function was trying to do both and it's much easier to read this way (and heck, even works). - Enable hardware normalization for chips that support it
2002-09-11- On reset, disable hardware normalization for 582x and make sure the chip ↵Jason Wright
is in little endian mode. - since sw normalization is now the only option, simplify normalization handling - remove some leftover #if 0 code
2002-09-04Treat 5822 the same as 5820Jason Wright
2002-09-045801 has no pk or rng supportJason Wright
2002-09-03add support for 5801 and 5802 which appear to be 5805's as far as sw is ↵Jason Wright
concerned
2002-07-085821 has two additional bits that must be ack'd (note they don't haveJason Wright
corresponding enable bits... they are always on... dain bramage).
2002-07-05Never call crp_callback directly, use crypto_done() insteadJason Wright
2002-07-05KNF (no space after casts)Jason Wright
2002-07-03But when denormalizing we need the normalized length, too as well as the ↵Jason Wright
destination length.
2002-07-03result only needs to be as big as the number of real bits in the modulusJason Wright
2002-06-17remove noisy jason debug printf blatther. bad pTheo de Raadt
2002-05-16Normalize the exponent too. This allows exponents with bit lengths differentJason Wright
from base/modulus to work on 5805.
2002-05-16Re-enable RNG on the 5601 (it needs to be disabled on some 5805 variants,Jason Wright
but I'm not sure which revisions yet).
2002-05-15Rework MODEXP:Jason Wright
5805 (and 5601) require the modulus and base to be normalized to the right of one of several different register lengths. The result is also normalized to the same length. Provide functions for shifting the bits back and forth as appropriate. Note: for consistencies sake the exponent is NOT normalized.
2002-05-13add and use three more flags:Jason Wright
RNG: chip has usable rng (5805/5820/5821) HWNORM: chip will automagically normalize bignums (5820/5821) BIGKEY: chip supports "large keys" (5820/5821)
2002-05-08- Go ahead and register to handle CRK_MOD_EXP_CRT opsJason Wright
- completely (almost) revamp kprocess_rsapriv to match what the chip expects - add and use a function to compute the significant bits of a given number (this will be necessary for normalization) [Still doesn't reproduce the broadcom or provos test data, but it's closer...]
2002-05-06basic infrastructure for handling RSA with CRT parameters. Just need toJason Wright
figure out how p, q, dp, dq, and pinv fit into the context.
2002-05-06- Only copy the significant bits of the result out (and make sure the bufferJason Wright
is long enough to handle it) and bzero the rest. - Increase key buffer sizes to 2048 bits.
2002-05-02the exponent parameter is:Jason Wright
1. byte counted (not word count * 4 counted) 2. not normalized (we don't normalize anything yet, so no biggy) Increase maximum size of exponent to 2048 bits. (Better length checks coming soon)
2002-05-02More of previous (don't refer to parameters by index directly)Jason Wright
Also, add a sanity check that the result bits must be >= modulus bits.
2002-05-02Don't refer to the parameters directly by number, use macro's so it can beJason Wright
changed later if necessary. Also, don't bother bzero'n the mcr, all of the fields are initialized anyway
2002-05-01- make sure 'me' is initializedJason Wright
- compute modulus bits early (if its too big, return E2BIG) - modulus bits must be rounded to 512/768/1024 (and/or 1536/2048 for 5820) - allocate the result based on modulus bits and bzero it - add two diagnostic checks that will hang the chip: unaligned result/length [score so far: 655 out of 1000 test cases work for modexp on 5820]
2002-04-30- Output chain length must be equal to the byte count of the modulus lengthJason Wright
- document parameter order (it may yet change) - don't bother setting mcr_pktlen, it isn't used
2002-04-28make UBSEC_NO_RNG work correctly (ie. it means no RNG, not no MCR2 operations)Jason Wright
2002-04-26debug stuff inside #ifdefTheo de Raadt
2002-04-26missed one; deraadtJason Wright
2002-04-261024 bit maxJason Wright
2002-04-26register as supporting modular exponentiationJason Wright
still contains much debugging code and isn't quite done, but its a start
2002-04-22clean up attach messagesJason Wright
2002-04-08Credit DARPA/USAF appropriately.Jason Wright
2002-03-14First round of __P removal in sysTodd C. Miller
2002-01-28Try to share a common src/dst map where possible, and cope with thatJason Wright
eventuality later in the code.
2002-01-28First round of post-bus_dma cleanups:Jason Wright
- remove the packl/packp arrays and rework handling appropriately - destination map may or may not exist, cope. - remove a redundant bus_dmamap_sync() in _process (real sync is in _feed) - remove long deprecated q_{src,dst}pkt stuff from queue structure
2002-01-28Quick (and a little dirty) conversion to bus_dma(9).Jason Wright
2002-01-24More cleaningJason Wright
2002-01-19From Patrik Lindergren (patrik@ipunplugged.com):Jason Wright
* make the driver big-endian aware * handling for DMA errors * move some allocations to attach From me: whitespace clean up and vtophys removal (almost works on sparc64)
2002-01-02at least ; required after label or case; openbsd@davidkrause.comTheo de Raadt
2001-12-07Don't disable TRDY/RETRY, this doesn't have the expected behavior.Jason Wright
2001-11-20Match bcom 5821 (this is untested and is based on the datasheet's claim thatJason Wright
the 5821 is "register and software compatible with Broadcom 5820").
2001-11-14- Move rng buffer allocation (bus_dmamem_map/unmap) to attach instead of duringJason Wright
the first timeout which is the wrong time to be calling bus_dmamem_map/unmap - Make sure that mastering is really enabled. - remove some debugging stuff that would be a pain to get working on sparc64.
2001-11-09be way more sure that software cannot be usedTheo de Raadt