diff --git a/security_test.go b/security_test.go
index <HASH>..<HASH> 100644
--- a/security_test.go
+++ b/security_test.go
@@ -67,5 +67,28 @@ func encryptDecryptVersioned(vsn encryptionVersion, t *testing.T) {
 		t.Errorf("len %d %v", len(plaintext), plaintext)
 		t.Fatalf("encrypt/decrypt failed! %d '%s' '%s'", cmp, msg, plaintext)
 	}
+}
+
+func TestDecryptMultipleKeys(t *testing.T) {
+	plaintext := []byte("this is a plain text message")
+	extra := []byte("random data")
+	keys := [][]byte{
+		[]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
+		[]byte{15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
+	}
 
+	var buf bytes.Buffer
+	err := encryptPayload(1, keys[1], plaintext, extra, &buf)
+	if err != nil {
+		t.Fatalf("err: %v", err)
+	}
+
+	msg, err := decryptPayload(keys, buf.Bytes(), extra)
+	if err != nil {
+		t.Fatalf("err: %v", err)
+	}
+
+	if !bytes.Equal(msg, plaintext) {
+		t.Fatalf("bad: %v", msg)
+	}
 }
Added test for decrypting success when the first key doesn't match.