2
$\begingroup$

I need help during implementation of C# interface (.NET framework) for encryption of messages which are sent to/from HBCI (Homebanking Computer Interface) server according to RDH-10 standard.

Predispositions for the encryption process are as follows:

  • Signature algorithm: RSA
  • Operation mode with signature: RSASSA-PSS [PKCS1], owner signing
  • HASH algorithm: SHA-256
  • Encryption algorithm: 2-Key-Triple-DES, CBC (0-Padding)

The mask generation function MGF1 is used as part of the padding process RSASSA-PSS. On the signing key is a double Hashing carried out. The length of the hash value is to be used as the salt length.

As a final result I need to be able to encrypt a message assuming that I have signing key and encryption key from the server. Those are 2 keys which I received:

Encryption Key: Modulus (248 bytes) (HEX) d3 60 fd 45 4d 23 68 d5 ca 2a 1c f7 42 bf f1 59 ae 69 1a c6 b2 30 6f f8 0b 7e 18 73 25 e5 13 fe 9a 78 6f 86 ad c8 b2 3f 8d 5b b2 83 bd 1b 9b ec e2 ab 60 26 2f 35 78 26 32 ea 88 02 e9 79 0d 51 0a 64 e9 37 68 21 13 8d 38 d9 95 85 fe 80 41 04 00 0f 7d 7c 20 2c 4c 04 c3 da d4 51 62 aa 59 d7 5e a6 44 1f 8a fb ab 2a 31 96 7e 77 8d c3 e5 f5 f3 bb 6d ab 8c f7 a9 5a 5e da 71 26 77 db ff 12 af 66 92 87 70 e1 92 28 15 83 9d b4 8d 42 48 cb 9b 71 9e d8 21 91 34 e0 d5 56 00 f7 3d 33 3c e5 cc f5 a4 ba cf c9 47 3d f3 25 8a 0c 82 0d 88 87 f4 08 d2 5c 0a 6a d9 92 61 47 5d 67 6c 44 24 a7 3d 07 4f 10 bf bd 5e 78 1b 38 d2 e0 af d7 74 1f a1 bc d7 35 db 26 f8 7a b6 b1 a1 1e c1 b6 6a 17 e2 3f b9 5f 8c b0 e1 e1 98 73 32 af bd 14 b2 ae ec 42 3b 81 f2 b1 98 33 (HEX END)

Exponent (3 bytes): (HEX) 01 00 01 (HEX END)

Signing Key: Modulus (248 bytes) (HEX) ce 6d f9 de b5 74 5b e8 d5 00 94 c1 0f 88 86 b5 f0 0f 3e 0c 0c fe 6e e9 6f c2 0f e6 30 74 fa d3 31 84 91 e0 29 42 fc e3 92 00 49 f7 da e2 db 1c fd 74 e9 a7 f1 f9 6a e6 f5 60 49 31 8c 65 71 49 6b c4 2e 3d fe 8c 1a 4b 53 2f 47 d2 51 ce e4 22 2c 1e 3a 6a 98 58 e0 50 4e cb e2 18 c6 f9 96 06 ce 9d 37 71 c3 0c 57 7f f6 06 24 16 b5 36 82 ef 1b 17 04 05 72 9a 33 67 83 5f 88 58 dc 18 ab 98 fe 99 27 3f 51 a1 c7 76 aa 81 05 db 49 5d 4c 65 d3 f4 a6 94 69 a8 32 c7 3d e8 f3 a2 93 40 52 eb 2a 90 ba 3e 2b 32 53 6f 58 50 83 97 23 2a de 90 c1 79 e7 14 fd 9c cb 3c fc 66 e8 e2 5a 6b 6d 3c a4 f1 23 78 85 e5 05 c5 cf c7 ab fe 5b 75 16 f7 78 1a 5d 5b ea e9 d6 92 36 81 a2 b6 a9 d6 aa e9 1c 45 59 65 ca 02 0c 6d 42 5b 00 e8 cf a6 7c 7a ce 00 6e 7c 71 1b 5b bd (HEX END)

Exponent (3 bytes): (HEX) 01 00 01 (HEX END)

There is also a electronic signature: (HEX) 31 06 ec f2 08 b0 8f 64 62 a9 db 20 d4 62 39 96 65 81 e5 61 f9 03 3b 50 18 68 3a e5 93 df a9 d6 29 22 ca f0 f7 8a 95 f1 f6 aa 5e a3 1f b9 b2 70 33 42 f2 cc b5 80 ce 7f e8 58 aa d8 20 2c 03 83 ba b2 6d 45 b7 bf 5f 1d 71 5c 81 15 6d 7f c2 04 b2 56 70 c7 a1 79 47 d0 a5 ca 5e 46 36 02 0e 19 26 ec f5 30 80 cc 90 49 22 14 a7 96 51 74 db f8 72 42 ca 73 30 77 11 d3 a1 61 05 39 85 96 2d f4 50 77 3a 80 1d da 39 e1 97 a2 e7 ba ed f5 8c 70 6a f3 e8 3c 42 8f 64 79 61 60 cb ae 25 c8 88 a8 87 93 1c e8 64 e0 f7 6b 7c 30 48 73 ca b7 e1 57 e8 f2 17 f9 83 d7 21 73 1e 34 cf 67 04 92 ae 7b ee b6 6f 60 be 74 e8 da e9 01 86 f3 cd ea 01 7f c0 fa 44 e7 82 98 db bb 93 7e 7d 10 4f 9c 41 4c 8f af 0f 28 b9 f3 f0 88 05 37 3a 3a c6 83 38 bd ad dc 1e d2 df ca 18 7e (HEX END)

I really hope you can help me with some guide, some code snippets etc.

Thanks!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.