Crypto: Test fixes and documentation update

- Supporting key size ranges for RSA key generation
- Optional suppport for ECC key for psa_asymmetric_encrypt
- Passing actual buffer size for negative tests
- Update failure analysis doc with github issue links
diff --git a/api-tests/val/common/val.h b/api-tests/val/common/val.h
index c9bcc33..f7ba5f0 100644
--- a/api-tests/val/common/val.h
+++ b/api-tests/val/common/val.h
@@ -1,5 +1,5 @@
 /** @file
- * Copyright (c) 2018-2019, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2018-2020, Arm Limited or its affiliates. All rights reserved.
  * SPDX-License-Identifier : Apache-2.0
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -165,6 +165,18 @@
         }                                                                           \
     } while (0)
 
+#define TEST_ASSERT_RANGE(arg1, range1, range2, checkpoint)                         \
+    do {                                                                            \
+        if ((arg1) < range1 || (arg1) > range2)                                     \
+        {                                                                           \
+            val->print(PRINT_ERROR, "\tFailed at Checkpoint: %d\n", checkpoint);    \
+            val->print(PRINT_ERROR, "\tActual: %d\n", arg1);                        \
+            val->print(PRINT_ERROR, "\tExpected range: %d to ", range1);            \
+            val->print(PRINT_ERROR, "%d", range2);                                  \
+            return 1;                                                               \
+        }                                                                           \
+    } while (0)
+
 /* enums */
 typedef enum {
     CALLER_NONSECURE = 0x0,