on 2014 Mar 21 3:04 AM
There is a similar discussion on stackoverflow about encrypting and decrypting in SA16 where it works with minor issues, but there I have a more specific and problematic question: I do understant why SA12 can not decrypt stuff encrypted in other systems, because it does not has the capability of setting up specific parameters, but what about the other way around, decrypting stuff in C# encrypted in SA12 or earlier? All I know from SA12 documentation is that it uses Rijndael algorithm and has a random IV and the size 128 or 256 can be specified, but I do not know the padding, the cipher mode and am not sure about the data rawness format.
So long story short: Is it possible to decrypt data encrypted in SA12 outside of the database?
No, it is not possible in v12. The algorithm itself is AES, but the way we break the data up into blocks for encryption, the IV we use, and the way we store the encrypted data are all proprietary and unpublished.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
While I can't tell the details, here's a link to an older similar question from the NNTP archives:
@sybase.com/>">Is encrypt function algorithm true AES
EDIT: Unfortunately, the link seems to be rendered incorrectly because of the contained "@", I suspect), so I paste it as pure text...here
nntp-archive.sybase.com/nntp-archive/action/article/<42d81576.5b5e.1681692777@sybase.com>
In my understanding, that would mean the encryption/decryption with v12 and below is done in a proprietary fashion and cannot be decrypted/encrypted externally.
You may however go the opposite way and use an external crypto lib within SQL Anywhere via the external call interface and make sure that way that encryption/decryption within and outside the database are compatible.
As to the IV: AFAIK, before v10.0.1 there was no random IV used, v10.0.1 introduced a database option (i.e. the "encrypt_aes_random_iv database option) to use a random IV on demand, and v11 and above will always use a random IV.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Graeme: Aside: Can you tell me why my cited NNTP archive link won't be displayed accordingly, and what I would need to correct that?
Even by looking at the original link you posted, I can't get to the right page. nntp-archive.sybase.com is pointing me at the web site for a law school in Florida so something weird is going on. But something's wrong with the URL to begin with - angle brackets are not allowed in a URL.
Hm, for me (and FF 27.1) that exact link does show the desired page, as can be seen here:
And it's also the link I get when I search for "Is encrypt function algorithm true AES" with Google - though there the angle brackets are encoded with "%3C" and "%3E". Weird.
The following is just a test whether the link works when angle brackets and the at sign are encoded...:
nntp-archive.sybase.com/nntp-archive/action/article/%3C42d81576.5b5e.1681692777%40sybase.com%3E
EDIT: Apparently, that won't work either though the preview seems to display the link itself correctly.
So linking to the NNTP archives seems somewhat errorprone here... - possibly that will raise a general question:(
Nope, I still get a 404. Tried with FF 27.0 and 28.0 as well as Chrome 33.0, IE 9, and IE 11. I think the web server is having trouble - a Google search for "sybase nntp encryption function algorithm true aes" finds the page, with the same URL as you posted, but I still get a 404 when I click on it.
User | Count |
---|---|
62 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.