Rating:

Solution:
The Python code given converts characters to their ASCII values:

```
def str_to_ass(input_string):
return ''.join([str(ord(char)) for char in input_string])
```
The challenge involves understanding the RSA encryption and decryption. After applying sine and cosine functions to binary representations of two primes p and q, the values are stored in two files. The final task is to decrypt the given encrypted message using RSA and recover the combination for the safe.

Key Steps:

Load the sine and cosine data from the files and reverse the transformation to get the binary representations of p and q.
Calculate n = p * q, phi = (p - 1) * (q - 1), and d = inverse(e, phi) where e = 65537.
Decrypt the message using pow(encrypted, d, n) and convert the resulting ASCII values to the flag.
Decrypted Message:
Y0U_@R3_T#3_W0RT#Y_OF_3

```
Flag:
VishwaCTF{Y0U_@R3_T#3_W0RT#Y_OF_3}
```

Original writeup (https://github.com/CyberCell-Viit/VishwaCTF-24-Writeups/blob/main/VishwaCTF'24/Cryptography/Intellectual%20Heir.pdf).