diff --git a/core/src/main/java/jenkins/security/DefaultConfidentialStore.java b/core/src/main/java/jenkins/security/DefaultConfidentialStore.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/jenkins/security/DefaultConfidentialStore.java
+++ b/core/src/main/java/jenkins/security/DefaultConfidentialStore.java
@@ -16,6 +16,7 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.security.GeneralSecurityException;
 import java.security.SecureRandom;
+import javax.crypto.BadPaddingException;
 import org.apache.commons.io.IOUtils;
 
 /**
@@ -107,6 +108,12 @@ public class DefaultConfidentialStore extends ConfidentialStore {
             return verifyMagic(bytes);
         } catch (GeneralSecurityException e) {
             throw new IOException("Failed to load the key: "+key.getId(),e);
+        } catch (IOException x) {
+            if (x.getCause() instanceof BadPaddingException) {
+                return null; // broken somehow
+            } else {
+                throw x;
+            }
         } finally {
             IOUtils.closeQuietly(cis);
             IOUtils.closeQuietly(fis);
[FIXED JENKINS-<I>] Treat BadPaddingException as an unloadable key and continue.

(cherry picked from commit <I>b8d<I>abdf8b<I>f4e1b8ce8bf<I>e<I>ad)

Conflicts:
	changelog.html