Giter Site home page Giter Site logo

cryptdecrypt-rsatest's Introduction

CryptDecrypt-RSATest

Console application demonstrates unexpected results with CryptDecrypt API with RSA encryption

This sample application demonstrates encrypting data in a specific way:

  • using CryptoAPI (not newer CNG/NCrypt API)
  • using "Microsoft Enhanced RSA and AES Cryptographic Provider" container
  • using the PROV_RSA_AES provider
  • using the AT_KEYEXCHANGE key for encryption & decryption

In this test scenario, a blob of data is encrypted with padding to key size (128 bytes). When the data is decrypted, the CRYPT_DECRYPT_RSA_NO_PADDING_CHECK flag is used to get the entire data with padding, rather than just the original data back.

This code produces the expected results on Windows "desktop" OSes 8.1 and 10, and on Windows Server OSes 2012R2 and 2016.

INCORRECT RESULTS are returned on Windows 8 and earlier desktop OSes, and on Windows Server 2012 and earlier.

cryptdecrypt-rsatest's People

Contributors

rpaulproxy avatar bob11327 avatar

Stargazers

 avatar

Watchers

evandrix avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.