Index Calculation Attacks on RSA Signature and Encryption