iso images encryption/decryption

Hi all,i was wondering is it possible in java that i can encypt "either symmetric/asymmetric" an iso image "*.iso" and the ciphered text be an iso image also that i can burn it on a cd using any burning utility as Nero is this possible?Thanks alot.
[269 byte] By [Radi0Shacka] at [2007-10-3 2:57:01]
# 1

An ISO image is no different from a binary file. So, yes, it can be encrypted and the cipher-text can be burned to a CD using Nero.

But, you cannot use the ciphertext to boot a PC, and given the size of typical ISO images of most applications/operating systems, you cannot use asymmetric keys to encrypt them. You will need to use a symmetric key to encrypt the image, and then you can encrypt the symmetric key with a public-key from an assymetric key-pair, and embed the encrypted symmetric key with the cipher-text of the ISO image in the same file.

If you are looking for sample source code on how to do this, using an industry standard like XML Encryption, you will find a full example in "xenc.java" and "sksImpl.java" from the source distribution of StrongKey at http://www.strongkey.org.

arshad.noora at 2007-7-14 20:46:21 > top of Java-index,Security,Cryptography...
# 2

hey thanks for you reply,

> An ISO image is no different from a binary file. So,

> yes, it can be encrypted and the cipher-text can be

> burned to a CD using Nero.

so what I/O stream should i use for the output ciphertext e.g new FileOutputStream("encdata.iso"); ?

Radi0Shacka at 2007-7-14 20:46:21 > top of Java-index,Security,Cryptography...
# 3
Ciphertext is either just a byte array, or if it is Base64-encoded, it is just a String. You can use any Java I/O object that handles these two data types to read and write them.
arshad.noora at 2007-7-14 20:46:21 > top of Java-index,Security,Cryptography...
# 4

Thanks alot again, but i have a question out of the scope "but please dont laugh at me :)" what is the relationn between cryptography and XML, i find many posts talking about cryptography and XML but i dont understand the realtion or the common thing among them so can any body help me show me an intro ?

Thanks in advance.

Radi0Shacka at 2007-7-14 20:46:21 > top of Java-index,Security,Cryptography...
# 5

There is no implicit connection between cryptography and XML. It just so happens that XML is a very portable and structured way of describing data elements, and a few cryptographic standards have been defined using XML - specifically XMLSignature, XMLEncryption and XML Key Management System (http://www.w3c.org) thus forming the connection.

Cryptographic data has been in use for many years, and other portable, structured formats for describing cryptographic data elements have been more frequently in use - Abstract Syntax Notation (ASN) and Public Key Cryptography Standards (PKCS) are two of them. However, neither ASN nor PKCS are very developer-friendly to business application developers while XML is (cryptographers eventually force themselves to learn it to get the job done). As application developers have migrated to using XML for lots of other things, it just made sense to define cryptographic standards in XML too, so that they didn't have to mix in ASN/PKCS with XML.

While ASN/PKCS will not disappear for quite some time, it is more likely that most new applications will start using the XML-related standards, thus making them dominant in the future.

arshad.noora at 2007-7-14 20:46:21 > top of Java-index,Security,Cryptography...
# 6
Hello,I prefer burning ISO with ISO-burner free tool. Rather it is small and very user friendly it is reliable as well and still never failed me http://www.ntfs.com/iso-burning.htm
trrianglea at 2007-7-14 20:46:21 > top of Java-index,Security,Cryptography...