Здравствуйте, olga145, Вы писали:
O>Добрый.
O>Вопрос: можно ли зашифровать данные алгоритмом RSA, не используя padding?
O>Пробовала CryptoAPI и Crypto++. Везде реализация с padding (PKCS #1.2: The length of plaintext data that can be encrypted with a call to CryptEncrypt with an RSA key is the length of the key modulus minus eleven bytes.).
O>А надо зашифровать блок, длинной равной модулю (например N), чтобы результат шифрования тоже получался N.
O>Есть идеи?
Воспользоваться библиотекой
Botan. Вот пример из ее документации:
// Raw encryption: no padding, input is directly encrypted by the key
// Don’t use this unless you know what you’re doing
PK_Encryptor* rsa_enc3 = get_pk_encryptor(rsakey, "Raw");
... << RSDN@Home 1.1.4 beta 7 rev. 447>>