Ticket #8928: 0002-Add-package-for-random-number-generators.patch

File 0002-Add-package-for-random-number-generators.patch, 1.7 KB (added by kevinoid, 6 years ago)

Patch to add a package for the cryptographic random number generators

  • package/kernel/modules/crypto.mk

    From 9152f2984921476abcbace83352c6fed1736f991 Mon Sep 17 00:00:00 2001
    From: Kevin Locke <klocke@digitalenginesoftware.com>
    Date: Wed, 23 Feb 2011 12:37:08 -0700
    Subject: [PATCH 2/8] Add package for random number generators
    
    This includes the rng and krng modules.  Since CONFIG_CRYPTO_RNG2 is
    required by CONFIG_CRYPTO_BLKCIPHER2, there is no need for any extra
    configuration option settings.
    
    Signed-off-by: Kevin Locke <klocke@digitalenginesoftware.com>
    ---
     package/kernel/modules/crypto.mk |   25 +++++++++++++++++++++++++
     1 files changed, 25 insertions(+), 0 deletions(-)
    
    diff --git a/package/kernel/modules/crypto.mk b/package/kernel/modules/crypto.mk
    index 0214a75..3a1c2e8 100644
    a b endef 
    7373$(eval $(call KernelPackage,crypto-wq)) 
    7474 
    7575 
     76# Order is important for auto-load, see note below 
     77CRYPTO_RNG_MODULES = \ 
     78        RNG2=rng \ 
     79        RNG2=krng 
     80 
     81# Note: rng and krng built by RNG2, required by BLKCIPHER2 
     82#       krng must auto-load after rng and crypto_algapi 
     83#       krng required to provide stdrng algorithm for IPSec 
     84define KernelPackage/crypto-rng 
     85  TITLE:=Random Number Generators 
     86  FILES:=$(foreach mod,$(CRYPTO_RNG_MODULES),$(call crypto_file,$(mod))) 
     87  AUTOLOAD:=$(call AutoLoad,04,$(foreach mod,$(CRYPTO_RNG_MODULES),$(call crypto_name,$(mod)))) 
     88  $(call AddDepends/crypto) 
     89endef 
     90 
     91define KernelPackage/crypto-rng/description 
     92 Kernel modules for random number generation 
     93 Includes: 
     94 - krng 
     95 - rng 
     96endef 
     97 
     98$(eval $(call KernelPackage,crypto-rng)) 
     99 
     100 
    76101define KernelPackage/crypto-hw-padlock 
    77102  TITLE:=VIA PadLock ACE with AES/SHA hw crypto module 
    78103  DEPENDS:=+kmod-crypto-aes