@Test public void validateKey_testVector() throws Exception { if (TestUtil.isTsan()) { return; } RsaSsaPssPublicKey publicKey = nistTestVectors[0].publicKeyProto; verifyManager.validateKey(publicKey); }
@Override public void validateKey(RsaSsaPssPublicKey pubKey) throws GeneralSecurityException { Validators.validateVersion(pubKey.getVersion(), getVersion()); Validators.validateRsaModulusSize(new BigInteger(1, pubKey.getN().toByteArray()).bitLength()); Validators.validateRsaPublicExponent(new BigInteger(1, pubKey.getE().toByteArray())); SigUtil.validateRsaSsaPssParams(pubKey.getParams()); }
RsaSsaPssVerifyKeyManager extends KeyTypeManager<RsaSsaPssPublicKey> { @Override public void validateKey(RsaSsaPssPublicKey pubKey) throws GeneralSecurityException { Validators.validateVersion(pubKey.getVersion(), getVersion()); Validators.validateRsaModulusSize(new BigInteger(1, pubKey.getN().toByteArray()).bitLength()); Validators.validateRsaPublicExponent(new BigInteger(1, pubKey.getE().toByteArray())); SigUtil.validateRsaSsaPssParams(pubKey.getParams()); } }
RsaSsaPssVerifyKeyManager extends KeyTypeManager<RsaSsaPssPublicKey> { @Override public void validateKey(RsaSsaPssPublicKey pubKey) throws GeneralSecurityException { Validators.validateVersion(pubKey.getVersion(), getVersion()); Validators.validateRsaModulusSize(new BigInteger(1, pubKey.getN().toByteArray()).bitLength()); Validators.validateRsaPublicExponent(new BigInteger(1, pubKey.getE().toByteArray())); SigUtil.validateRsaSsaPssParams(pubKey.getParams()); } RsaSsaPssVerifyKeyManager(); }
RsaSsaPssVerifyKeyManager extends KeyTypeManager<RsaSsaPssPublicKey> { @Override public void validateKey(RsaSsaPssPublicKey pubKey) throws GeneralSecurityException { Validators.validateVersion(pubKey.getVersion(), getVersion()); Validators.validateRsaModulusSize(new BigInteger(1, pubKey.getN().toByteArray()).bitLength()); Validators.validateRsaPublicExponent(new BigInteger(1, pubKey.getE().toByteArray())); SigUtil.validateRsaSsaPssParams(pubKey.getParams()); } RsaSsaPssVerifyKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override RsaSsaPssPublicKey parseKey(ByteString byteString); @Override void validateKey(RsaSsaPssPublicKey pubKey); }
RsaSsaPssVerifyKeyManager extends KeyTypeManager<RsaSsaPssPublicKey> { @Override public void validateKey(RsaSsaPssPublicKey pubKey) throws GeneralSecurityException { Validators.validateVersion(pubKey.getVersion(), getVersion()); Validators.validateRsaModulusSize(new BigInteger(1, pubKey.getN().toByteArray()).bitLength()); Validators.validateRsaPublicExponent(new BigInteger(1, pubKey.getE().toByteArray())); SigUtil.validateRsaSsaPssParams(pubKey.getParams()); } RsaSsaPssVerifyKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override RsaSsaPssPublicKey parseKey(ByteString byteString); @Override void validateKey(RsaSsaPssPublicKey pubKey);  }