1. 14 7月, 2015 2 次提交
  2. 08 7月, 2015 1 次提交
  3. 07 7月, 2015 2 次提交
  4. 25 6月, 2015 6 次提交
  5. 22 6月, 2015 9 次提交
    • H
      crypto: algif_aead - Temporarily disable all AEAD algorithms · 3e90950d
      Herbert Xu 提交于
      As the AEAD conversion is still ongoing, we do not yet wish to
      export legacy AEAD implementations to user-space, as their calling
      convention will change.
      
      This patch actually disables all AEAD algorithms because some of
      them (e.g., cryptd) will need to be modified to propagate this flag.
      
      Subsequent patches will reenable them on an individual basis.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      3e90950d
    • H
      crypto: af_alg - Forbid the use internal algorithms · 15539de5
      Herbert Xu 提交于
      The bit CRYPTO_ALG_INTERNAL was added to stop af_alg from accessing
      internal algorithms.  However, af_alg itself was never modified to
      actually stop that bit from being used by the user.  Therefore the
      user could always override it by specifying the relevant bit in the
      type and/or mask.
      
      This patch silently discards the bit in both type and mask.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      15539de5
    • H
      crypto: echainiv - Only hold RNG during initialisation · 9fcc704d
      Herbert Xu 提交于
      This patch changes the RNG allocation so that we only hold a
      reference to the RNG during initialisation.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      9fcc704d
    • H
      crypto: seqiv - Add compatibility support without RNG · eeee12aa
      Herbert Xu 提交于
      When seqiv is used in compatibility mode, this patch allows it
      to function even when an RNG Is not available.  It also changes
      the RNG allocation for the new explicit seqiv interface so that
      we only hold a reference to the RNG during initialisation.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      eeee12aa
    • H
      crypto: eseqiv - Offer normal cipher functionality without RNG · 055906d1
      Herbert Xu 提交于
      The RNG may not be available during early boot, e.g., the relevant
      modules may not be included in the initramfs.  As the RNG Is only
      needed for IPsec, we should not let this prevent use of ciphers
      without IV generators, e.g., for disk encryption.
      
      This patch postpones the RNG allocation to the init function so
      that one failure during early boot does not make the RNG unavailable
      for all subsequent users of the same cipher.
      
      More importantly, it lets the cipher live even if RNG allocation
      fails.  Of course we no longer offer IV generation and which will
      fail with an error if invoked.  But all other cipher capabilities
      will function as usual.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      055906d1
    • H
      crypto: chainiv - Offer normal cipher functionality without RNG · 341476d6
      Herbert Xu 提交于
      The RNG may not be available during early boot, e.g., the relevant
      modules may not be included in the initramfs.  As the RNG Is only
      needed for IPsec, we should not let this prevent use of ciphers
      without IV generators, e.g., for disk encryption.
      
      This patch postpones the RNG allocation to the init function so
      that one failure during early boot does not make the RNG unavailable
      for all subsequent users of the same cipher.
      
      More importantly, it lets the cipher live even if RNG allocation
      fails.  Of course we no longer offer IV generation and which will
      fail with an error if invoked.  But all other cipher capabilities
      will function as usual.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      341476d6
    • H
      crypto: user - Add CRYPTO_MSG_DELRNG · 9aa867e4
      Herbert Xu 提交于
      This patch adds a new crypto_user command that allows the admin to
      delete the crypto system RNG.  Note that this can only be done if
      the RNG is currently not in use.  The next time it is used a new
      system RNG will be allocated.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      9aa867e4
    • H
      crypto: rng - Do not free default RNG when it becomes unused · 7cecadb7
      Herbert Xu 提交于
      Currently we free the default RNG when its use count hits zero.
      This was OK when the IV generators would latch onto the RNG at
      instance creation time and keep it until the instance is torn
      down.
      
      Now that IV generators only keep the RNG reference during init
      time this scheme causes the default RNG to come and go at a high
      frequencey.  This is highly undesirable as we want to keep a single
      RNG in use unless the admin wants it to be removed.
      
      This patch changes the scheme so that the system RNG once allocated
      is never removed unless a specifically requested.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      7cecadb7
    • H
      crypto: skcipher - Allow givencrypt to be NULL · 21dbd96f
      Herbert Xu 提交于
      Currently for skcipher IV generators they must provide givencrypt
      as that is the whole point.  We are currently replacing skcipher
      IV generators with explicit IV generators.  In order to maintain
      backwards compatibility, we need to allow the IV generators to
      still function as a normal skcipher when the RNG Is not present
      (e.g., in the initramfs during boot).  IOW everything but givencrypt
      and givdecrypt will still work but those two will fail.
      
      Therefore this patch assigns a default givencrypt that simply
      returns an error should it be NULL.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      21dbd96f
  6. 21 6月, 2015 1 次提交
  7. 18 6月, 2015 2 次提交
  8. 17 6月, 2015 10 次提交
  9. 11 6月, 2015 2 次提交
  10. 10 6月, 2015 2 次提交
    • S
      crypto: drbg - reseed often if seedsource is degraded · 42ea507f
      Stephan Mueller 提交于
      As required by SP800-90A, the DRBG implements are reseeding threshold.
      This threshold is at 2**48 (64 bit) and 2**32 bit (32 bit) as
      implemented in drbg_max_requests.
      
      With the recently introduced changes, the DRBG is now always used as a
      stdrng which is initialized very early in the boot cycle. To ensure that
      sufficient entropy is present, the Jitter RNG is added to even provide
      entropy at early boot time.
      
      However, the 2nd seed source, the nonblocking pool, is usually
      degraded at that time. Therefore, the DRBG is seeded with the Jitter RNG
      (which I believe contains good entropy, which however is questioned by
      others) and is seeded with a degradded nonblocking pool. This seed is
      now used for quasi the lifetime of the system (2**48 requests is a lot).
      
      The patch now changes the reseed threshold as follows: up until the time
      the DRBG obtains a seed from a fully iniitialized nonblocking pool, the
      reseeding threshold is lowered such that the DRBG is forced to reseed
      itself resonably often. Once it obtains the seed from a fully
      initialized nonblocking pool, the reseed threshold is set to the value
      required by SP800-90A.
      Signed-off-by: NStephan Mueller <smueller@chronox.de>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      42ea507f
    • S
      crypto: drbg - Use callback API for random readiness · 57225e67
      Stephan Mueller 提交于
      The get_blocking_random_bytes API is broken because the wait can
      be arbitrarily long (potentially forever) so there is no safe way
      of calling it from within the kernel.
      
      This patch replaces it with the new callback API which does not
      have this problem.
      
      The patch also removes the entropy buffer registered with the DRBG
      handle in favor of stack variables to hold the seed data.
      Signed-off-by: NStephan Mueller <smueller@chronox.de>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      57225e67
  11. 09 6月, 2015 2 次提交
  12. 04 6月, 2015 1 次提交