A method for testing for anomalous cryptographic key material comprising: obtaining a set of cryptographic key material, each cryptographic key material in the set having a set of attributes, the number of attributes in the set of attributes defining a dimensionality of the set of cryptographic key material; creating an anomalous scoring model based on an estimated density derived from the set of cryptographic key material, receiving cryptographic key material from a relying system; calculating an anomaly score for the cryptographic key material based on the anomalous scoring model; and returning the anomaly score to the relying system, the anomaly score used by the relying system to determine whether to honor a request associated with the cryptographic key material; wherein creating the anomalous scoring model comprises at least the operations of: receiving a bias vector defining relative importance of the set of attributes; characterised by receiving a target dimension defining a dimensionality of an intermediate representation of the set of cryptographic key material; reducing the dimensionality of the set of cryptographic key material to the target dimension utilizing a first selected numerical method to form the intermediate representation; and creating the estimated density using the intermediate representation and a second selected numerical method. obtaining a set of cryptographic key material, each cryptographic key material in the set having a set of attributes, the number of attributes in the set of attributes defining a dimensionality of the set of cryptographic key material; creating an anomalous scoring model based on an estimated density derived from the set of cryptographic key material, receiving cryptographic key material from a relying system; calculating an anomaly score for the cryptographic key material based on the anomalous scoring model; and returning the anomaly score to the relying system, the anomaly score used by the relying system to determine whether to honor a request associated with the cryptographic key material; wherein creating the anomalous scoring model comprises at least the operations of: receiving a bias vector defining relative importance of the set of attributes; characterised by receiving a target dimension defining a dimensionality of an intermediate representation of the set of cryptographic key material; reducing the dimensionality of the set of cryptographic key material to the target dimension utilizing a first selected numerical method to form the intermediate representation; and creating the estimated density using the intermediate representation and a second selected numerical method. receiving a bias vector defining relative importance of the set of attributes; characterised by receiving a target dimension defining a dimensionality of an intermediate representation of the set of cryptographic key material; reducing the dimensionality of the set of cryptographic key material to the target dimension utilizing a first selected numerical method to form the intermediate representation; and creating the estimated density using the intermediate representation and a second selected numerical method. <EOS>