Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto: don't check hash size when the main algorithm is ECDSA #1497

Merged
merged 1 commit into from
Apr 26, 2017

Commits on Apr 26, 2017

  1. crypto: don't check hash size when the main algorithm is ECDSA

    syscall_asymm_verify() (and therefore TEE_AsymmetricVerifyDigest())
    incorrectly assumes that the hash algorithm is SHA1 when the main
    algorithm is ECDSA, and will panic the TA if the hash size is not set
    accordingly. This behavior does not comply with the TEE Internal Core
    API v1.1, which states:
    
    "Where a hash algorithm is specified in the algorithm, digestLen SHALL
     be equal to the digest length of this hash algorithm".
    
    For TEE_ALG_ECDSA_P192, TEE_ALG_ECDSA_P224, TEE_ALG_ECDSA_P256,
    TEE_ALG_ECDSA_P384 and TEE_ALG_ECDSA_P521, no hash algorithm is
    specified, and so we must not restrict the hash size to any specific
    value.
    
    Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
    Reported-by: Henrik Andersson <Henrik.Andersson@se.bosch.com>
    Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
    Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
    Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
    jforissier committed Apr 26, 2017
    Configuration menu
    Copy the full SHA
    fa05bd2 View commit details
    Browse the repository at this point in the history