if (algo != AlgoType::RSA_SV && hash == HashAlgorithm::NONE)
ThrowErr(Exc::Crypto::InputParam, "Only RSA supports no hash option");
+ RSAPaddingAlgorithm padding = RSAPaddingAlgorithm::NONE;
+ alg.getParam(ParamName::SV_RSA_PADDING, padding);
+ if (algo == AlgoType::RSA_SV && padding != RSAPaddingAlgorithm::PKCS1)
+ ThrowErr(Exc::Crypto::InputParam, "Only PKCS1 padding is supported");
+
RawBuffer signature;
TrustZoneContext::Instance().executeSign(getAlgType(algo),
getHashType(hash),
if (algo != AlgoType::RSA_SV && hash == HashAlgorithm::NONE)
ThrowErr(Exc::Crypto::InputParam, "Only RSA supports no hash option");
+ RSAPaddingAlgorithm padding = RSAPaddingAlgorithm::NONE;
+ alg.getParam(ParamName::SV_RSA_PADDING, padding);
+ if (algo == AlgoType::RSA_SV && padding != RSAPaddingAlgorithm::PKCS1)
+ ThrowErr(Exc::Crypto::InputParam, "Only PKCS1 padding is supported");
+
return TrustZoneContext::Instance().executeVerify(getAlgType(algo),
getHashType(hash),
pkeyId,