Skip to content
  • Eric Biggers's avatar
    crypto: ccm - fix incompatibility between "ccm" and "ccm_base" · a80da82d
    Eric Biggers authored
    commit 6a1faa4a upstream.
    
    CCM instances can be created by either the "ccm" template, which only
    allows choosing the block cipher, e.g. "ccm(aes)"; or by "ccm_base",
    which allows choosing the ctr and cbcmac implementations, e.g.
    "ccm_base(ctr(aes-generic),cbcmac(aes-generic))".
    
    However, a "ccm_base" instance prevents a "ccm" instance from being
    registered using the same implementations.  Nor will the instance be
    found by lookups of "ccm".  This can be used as a denial of service.
    Moreover, "ccm_base" instances are never tested by the crypto
    self-tests, even if there are compatible "ccm" tests.
    
    The root cause of these problems is that instances of the two templates
    use different cra_names.  Therefore, fix these problems by making
    "ccm_base" instances set the same cra_name as "ccm" instances, e.g.
    "ccm(aes)" instead of "ccm_base(ctr(aes-generic),cbcmac(aes-generic))".
    
    This requires extracting the block cipher n...
    a80da82d