Is there a way to determine if a string is RSA encrypted?

Posted on 2011-10-11
Last Modified: 2012-05-12
I have a function that will encrypt an decrypt using System.Security.Cryptography and the RSA algorithim.  Is there a way to determine if the string is already encrypted?
Question by:Elliott Ward
    LVL 83

    Expert Comment

    One way is to try to decrypt it and if its succeeds then its encrypted.
    LVL 17

    Expert Comment

    by:Carlos Villegas
    I'm agreed with CodeCruiser, but taking into account that the common use of that algorithm is to encrypt small piece of data maybe you can also rely on the fixed size in bytes (128, 512, etc...) of your data to check if it is encrypted, with little performance penalty, if that is your concern.

    Author Comment

    by:Elliott Ward
    What I am really after is tryiing to figure out if a string field is unencrypted or not.
    LVL 83

    Accepted Solution

    There is no magical way of finding that out unless you use some sort of flag to indicate whether or not the field is encrypted.

    Author Closing Comment

    by:Elliott Ward
    No solution was possible but the question was answered completely and accurately

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    This video discusses moving either the default database or any database to a new volume.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now