In an improved cryptographic system supporting common data security architecture applications and including a common data security architecture framework coupled to an application requiring cryptographic support through an application interface and further coupled to a plurality of pluggable modules through a service provider interface, a method for varying cryptographic strength for the common data security architecture applications, comprising the steps of:
- (a) initializing the common data security architecture framework including reading and checking configuration files for crypto strength and signature;
- (b) creating a crypto context in the application with an algorithm ID and key length provided by the common data security architecture framework;
- (c) returning a crypto context handle to the application;
- (d) requesting an exempt all privilege for the current thread;
- (e) checking the application credentials for signatures;
- (f) extracting a privilege set from signed credentials;
- (g) determining if the privileged set includes an exempt all privilege;
- (h) setting a strong crypto allowed flag to true for a privilege application;
- (i) determining if the crypto strength is greater than the default crypto strength of the application;
- (j) determining if the strong crypto allowed flag is set to true;
- and
- (k) encrypting the application with strong crypto strength when the strong crypto allowed flag is set to true or returning and error code when the flag is not true.