Triple DES CBC Encryption using an Initial Vector

How can triple DES encryption in CBC be done using the javacard package and not javax?
Will this do?
               cipher3DESCBCDebSesKey1.init( key, Cipher.MODE_ENCRYPT, initVector, (short) 0, (short) 8);
               cipher3DESCBCDebSesKey1.doFinal( input, (short) 0, (short) 16, SesKey, (short) 0 );
After all the initialization, will the doFinal already give me the result of triple DES using CBC? or do I have to init* and doFinal* three times?
Also, I used the no pad setting for this one.
cipher3DESCBCDebSesKey1 = Cipher.getInstance( Cipher.ALG_DES_CBC_NOPAD, false );

The fact that only the first block is corrupt is indicative that I you are not using the same IV on both sides. This is confirmed by your PHP code that seems to generate a random IV so your chance of getting the same IV on both sides is just about zero.

Similar Messages

  • Utility to generate the triple des (3DES) encrypted password in wl 6.1?

    To take advantage of the encrypted passwords in config.xml, as of wl 6.1, is
    there a weblogic utiltiy or api tha could be used to encrypt plaintext into
    the triple-des symmetric key PRIOR to having an SA or DBA type it into the
    console? This would help me greatly in the deployment and security of
    passwords.
    Thanks in Advance,
    Steve Rogers

    Hi,
    Thank you for your question.
    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Thank you for your understanding and support.
    Best Regards,
    Aiden
    Aiden Cao
    TechNet Community Support

  • How to encrypt excel file data using triple DES algorithm in oracle

    Hi,
    I would like to know the process or script to encrypt/decrypt the excel file data using triple DES algorithm in oracle.

    I'm not quite sure your requirement.... do you mean when uploading files to be stored in the database ?

  • Decrypting PEM file using Triple DES

    Hi all,
    I am trying to decrypt a Triple DES encrypted RSAPrivateKey stored in PEM format in a file. How do I get the DES key to initialize the Cipher. I am using the following code to get the IV from the file and get the DES key using pass phrase. But I get the message
    java.lang.SecurityException: Unsupported keysize or algorithm parameters
    Can someone help me.
    Thanks in advance,
    Trilok.
    // Gets the IV params from the RSAPrivate key PEM file.
    // Uses the last 16 digits in this line to get the IV.
    // DEK-Info: DES-EDE3-CBC,4A90C209D3A81791
    private IvParameterSpec getIV(String s) { // here s = 4A90C209D3A81791
    byte[] ivBytes = new byte[8];
    for (int j=0; j<8; j++) {
    ivBytes[j] = (byte)Integer.parseInt(s.substring(j*2, j*2 + 2), 16);
    return new IvParameterSpec(ivBytes);
    private SecretKeySpec getSecretKey(byte [] pwd, byte [] iv)
    throws NoSuchAlgorithmException {
         byte[] keyMat = new byte[24];
         MessageDigest md = MessageDigest.getInstance("MD5");
         md.update(pwd);
         md.update(iv);
         byte[] data = md.digest();
         System.arraycopy(data, 0, keyMat, 0, 16);
         md.update(data);
         md.update(pwd);
         md.update(iv);
         data = md.digest();
         System.arraycopy(data, 0, keyMat, 16, 8);
         return new SecretKeySpec(keyMat, encAlg);
    }

    Hi trilok,
    Please let me know what JCE provider you are using for decrypting the Key.
    Please make sure that you have made the static or dynamic registration properly.
    For Static registration:
    Please go to JAVA_HOME/jre/lib/security/java.security
    Please edit
    security.provider.1=sun.security.provider.Sun
    For Dynamic Registration
    Security.addProvider(new com.sun.crypto.provider.SunJCE());
    Also please refer this URL, which is the third party provider which supports RSA.
    http://www.bouncycastle.org/latest_releases.html
    I hope this will help you.
    Thanks
    Bakrudeen
    Technical Support Engineer
    Sun MicroSystems Inc, India

  • Read PKCS8 encrypted key with Triple DES

    Hi, I have a RSA private key in a PKCS8 file, encrypted with Triple DES. I can obtain the RSA private key with the command:
    openssl pkcs8 -inform der -v2 des3 -passin pass:mypass -in private.key > rsakey.key
    Then I can read it in Java using bouncycastle classes:
                    Security.addProvider(new BouncyCastleProvider());
              String file = "rsakey.key";
              PEMReader pr = new PEMReader(new FileReader(file));
              Object obj = pr.readObject();
              KeyPair kp = (KeyPair) obj;
              PrivateKey privateKey = kp.getPrivate();My question is:
    How can I use the bouncycastle classes to replace the openssl command, So all the process stays in java.
    Thanks in advance
    Rich

    The class for this is javax.crypto.EncryptedPrivateKeyInfo but I seem to be having trouble getting it to work (I've posted about my problem in the Cryptography forum).

  • Error when using DES/CBC/PKCS5Padding

    When I using the captioned algorithm, the system repor no such algorithm.
    import javax.crypto.*;
    import javax.crypto.spec.*;
    Cipher c = Cipher.getInstance("DES/CBC/PKCS5Padding");Can anybody give me some tips?

    Don't worry, I found my mistake and solve the problem now.
    Thanks everybody.

  • Encryption using  DES

    Hi
    I am using DES to encrypt text files and decrypt them back successfully
    But if I use the same Algorithms with word or MS Excel documents
    The decryption stage does not brig back the file into its original state ??
    Please advise if there is a special way to use DES with MS documents
    Thanks

    For almost all practical purposes a "byte" means
    "eight bits". Certainly that applies here.
    A Word document is just a collection of eight bit
    values (bytes). If your code is treating a Word
    document differently from any other file then your
    code is wrong.Sorry I ment to say byte
    however , I have read some bytes from the file in byte []bt array
    using the following
                // find out howmany bits in every byte
                 for ( int n = 0 ; n < bt.length ; n++){
                      int v = bt[n] ;
                       String binstr = Integer.toBinaryString(v);
                     System.out.print ("\n    " + new String(binstr) +  "    { # bits is : "+ binstr.length()+" }");
                  }And that what I have
    THE NUMBER OF BYTES IN THE FILE IS >>> : 24064
    11111111111111111111111111010000 { # bits is : 32 }
    11111111111111111111111111001111 { # bits is : 32 }
    10001 { # bits is : 5 }
    11111111111111111111111111100000 { # bits is : 32 }
    11111111111111111111111110100001 { # bits is : 32 }
    11111111111111111111111110110001 { # bits is : 32 }
    11010 { # bits is : 5 }
    11111111111111111111111111100001 { # bits is : 32 }
    0 { # bits is : 1 }
    0 { # bits is : 1 }
    0 { # bits is : 1 }
    0 { # bits is : 1 }
    0 { # bits is : 1 }
    0 { # bits is : 1 }
    0 { # bits is : 1 }
    0 { # bits is : 1 }
    0 { # bits is : 1 }
    0 { # bits is : 1 }
    0 { # bits is : 1 }
    0 { # bits is : 1 }
    0 { # bits is : 1 }
    0 { # bits is : 1 }
    0 { # bits is : 1 }
    0 { # bits is : 1 }
    111110 { # bits is : 6 }
    0 { # bits is : 1 }
    11 { # bits is : 2 }
    0 { # bits is : 1 }
    11111111111111111111111111111110 { # bits is : 32 }
    11111111111111111111111111111111 { # bits is : 32 }
    1001 { # bits is : 4 }
    0 { # bits is : 1 }
    // Appending '0' to byte ?? to make it to 32 bits ??

  • Single sign on using AES or Triple DES algorithm.

    Hello all-
    At my client place we have to setup a Single Sign On Functionality to an external system. The link will be on the portal page for the employees to click. This functioanlity has to be done by either AES (Advanced Encryption Algorithm) or Triple DES algorithm.
    When the user clicks the SSO link on the portal page, the BSP application should implement any of these two above mentioned encryption algorithms and post the encrypted key appended to the third party URL. Then the third party system will decrypt and verify the user who is requesting the information and accordingly either allow or deny.
    If anyone has any info on this please revert back.
    Thank you very much for the help.
    Ramesh.

    Hi Ramesh,
    Did u get any clarification regarding Standard Triple DES algorithm.
    If yes,Please let me know.
    Thanks,
    JOhny lever

  • How to get the fixed result in a DES/CBC mode with fixed input data and fix

    How to get the fixed result in a DES/CBC mode with fixed input data and fixed key. Below is my program , I tried to get the checksum of the DESInputData with the DESKeyData, but each time the result is different.
    below is my code:
    byte[] DESKeyData = {(byte)0x01 ,(byte)0x01 ,(byte)0x01 ,(byte)0x01, (byte)0x01 ,(byte)0x01 ,(byte)0x01 ,(byte)0x01 };
    byte[] DESInputData = {(byte)0x31 ,(byte)0x31 ,(byte)0x31 ,(byte)0x31,(byte)0x31 ,(byte)0x31 ,(byte)0x31 ,(byte)0x31 };
    SecretKeySpec skey = new SecretKeySpec( DESKeyData, "DES" );
    Cipher cipher = Cipher.getInstance("DES/CBC/NoPadding");
    cipher.init( Cipher.ENCRYPT_MODE, skey );
    byte[] result = cipher.doFinal( DESInputData );

    Use class javax.crypto.spec.IvParameterSpec to specify IV for CBC mode cipher:
    // Create CBC-mode triple-DES cipher.
    Cipher c = Cipher.getInstance("DESede/CBC/PKCS5Padding");
    // Specify IV.
    IvParameterSpec iv = new IvParameterSpec(new byte[] { (byte)0x01, (byte)0x23, (byte)0x45, (byte)0x67, (byte)0x89, (byte)0xAB, (byte)0xCD, (byte)0xEF });
    // Initialize cipher with proper IV.
    c.init(Cipher.ENCRYPT_MODE, yourKey, iv);
    // Encrypt and decrypt should work ok now.
    For more info about cryptography, search the Internet for IntroToCrypto.pdf from mr. Phil Zimmerman. This document is also part of PGP (http://www.pgp.com).
    An excellent book is 'Applied Cryptography' from Bruce Schneier (http://www.counterpane.com/applied.html).
    Regards,
    Ronald Maas

  • Need explanation for DES/CBC/NoPadding

    Hallo,
    I have the following problem:
    when I try do use the encryption mode DES/CBC/NoPadding my program fails to decrypt
    first 8 bytes. (I implement my own padding)
    (may be I could just before encrypting the plain text insert
    in the beginning of the message 8 bits of random data, but hasnot the
    the function of the API do that stuff instead of me?)
    I'd like to understand just this case, so please don't advice using another scheme or PKxxx
    padding.
    thanks in advance!
    the code I use to encrypt:
    private static byte[] encryptionCBC(byte[] baToEncode, SecretKey desKey, IvParameterSpec IV)
            throws  IllegalBlockSizeException, BadPaddingException,
                    NoSuchAlgorithmException, NoSuchPaddingException,
                    InvalidAlgorithmParameterException,
                    InvalidKeyException, ShortBufferException 
        Cipher c = Cipher.getInstance("DES/CBC/NoPadding");
        c.init(Cipher.ENCRYPT_MODE, desKey, IV);
        byte[] toEncrypt = transformToPadded(baToEncode);
        byte[] encrypted = new byte[(toEncrypt.length / 64) * c.getOutputSize(64)];
        for (int i = 0; i < toEncrypt.length/64; i++) {
            byte[] encryptedBlock = new byte[c.getOutputSize(64)];
            c.update(toEncrypt,i,64,encryptedBlock);
            System.arraycopy(encryptedBlock, 0, encrypted, c.getOutputSize(64) * i,
                                 c.getOutputSize(64));
        c.doFinal();
        return encrypted;
    }//encryptionCBCthe code I use to decrypt:
    private static byte[] decryptionCBC(byte[] baToDecode, SecretKey desKey, IvParameterSpec IV)
            throws  IllegalBlockSizeException, BadPaddingException,
                    NoSuchAlgorithmException, NoSuchPaddingException,
                    InvalidAlgorithmParameterException,
                    InvalidKeyException, ShortBufferException 
        Cipher c = Cipher.getInstance("DES/CBC/NoPadding");
        c.init(Cipher.DECRYPT_MODE, desKey, IV);
        byte[] decrypted = new byte[64 * baToDecode.length / c.getOutputSize(64)];
        for (int i = 0; i < baToDecode.length / c.getOutputSize(64); i++) {
            byte[] decryptedBlock = new byte[64];
            c.update(baToDecode, i, c.getOutputSize(64), decryptedBlock);
            System.arraycopy(decryptedBlock, 0, decrypted, 64 * i, 64);
        c.doFinal();
        boolean flag = false;
        // remove padding if exists
        for(int i = 0; i<decrypted.length; i++){
            if (flag) {
                decrypted[i] = 0x20; // padding with space
            //find the end of the message = Ctrl+Z
            if (!flag && decrypted[i] == 0x1A){
                    decrypted=0x20; // the end of the message reached we can
    flag = true; // pad the rest with space
    // byte[] iv = IV.getIV();
    // for (int i=0; i<8; i++)
    // decrypted[i] = (byte)(decrypted[i] ^ iv[i]);
    return decrypted;
    }//decryptionCBC
    // to implement simple padding
    // using ctrl-z to designate the end of the cleartext
    private static byte[] transformToPadded(byte[] x) {
         if (x.length % 64 == 0)
              return x;
         else{
              byte[] tail = new byte[64 - x.length % 64];
              java.util.Random rand = new java.util.Random();
              rand.nextBytes(tail);
              tail[0] = 0x1A; // Ctrl+Z
              byte[] result = new byte[x.length + tail.length];
              System.arraycopy(x, 0, result, 0, x.length);
              System.arraycopy(tail, 0, result, x.length, tail.length);
              return result;               
    }// transform

    Hi,
    In most cases the initialization vectors are wrong when the decryption of the first 8 bytes fails with CBC mode encryption.
    Two suggestions:
    1) Try changing CBC mode to ECB mode (just for testing). If ECB mode works, you know the problem has something to do with the IV.
    2) Ensure that the IV passed to encryption and decryption are identical.
    Regards,
    Ronald Maas

  • What's the problem on the DES PBE encryption

    I've tried the to make a DES encryption by using my provided key
    But it got the the following errors :
    <pre>
    Exception in thread "main" java.security.spec.InvalidKeySpecException: Inappropriate key specification
    at com.sun.crypto.provider.DESKeyFactory.engineGenerateSecret(DashoA6275)
    at javax.crypto.SecretKeyFactory.generateSecret(DashoA6275)
    at t.main(t.java:37)
    </pre>
    <pre>
    import java.security.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    public class t{
         public static void main(String[] args) throws Exception{
              char[] charArray = new char[5];
              ("mykey").getChars(0, 5, charArray, 0);
              PBEKeySpec pbeKeySpec = new PBEKeySpec(charArray);
              SecretKeyFactory keyFac = SecretKeyFactory.getInstance("DES");
              SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);
              Cipher pbeCipher = Cipher.getInstance("DES");
         pbeCipher.init(Cipher.ENCRYPT_MODE, pbeKey);
         // Our cleartext
         byte[] cleartext = "This is another example".getBytes();
         // Encrypt the cleartext
         byte[] ciphertext = pbeCipher.doFinal(cleartext);
    </pre>
    Do anyone know how to solve it, thx

    Just a note: DES only has a 56-bit key so it's not consider secure enough these days (triple-DES is but it doesn't work directly with PBE)...
    - Doug
    javax.crypto.spec.PBEParameterSpec paramSpec
    = new javax.crypto.spec.PBEParameterSpec( "mySalt".getBytes(), 1000 );
    javax.crypto.spec.PBEKeySpec keySpec
    = new javax.crypto.spec.PBEKeySpec("myPassword".toCharArray());
    javax.crypto.SecretKeyFactory kf
    = javax.crypto.SecretKeyFactory.getInstance("PBEWithMD5AndDES");
    javax.crypto.SecretKey passwordKey = kf.generateSecret( keySpec );
    javax.crypto.Cipher cipher
    = javax.crypto.Cipher.getInstance("PBEWithMD5AndDES");
    cipher.init(javax.crypto.Cipher.ENCRYPT_MODE, passwordKey, paramSpec);
    // Our cleartext
    byte[] cleartext = "This is another example".getBytes();
    // Encrypt the cleartext
    byte[] ciphertext = cipher.doFinal(cleartext);
    System.out.println("Ciphertext is : " + new String(ciphertext));

  • About IV (initial vector)..

    I'm investigating about some oracle security features.
    I'm very interested in various encryption methods like OBFUSCATION, DBMS_CRYPTO, Transparent Data Encryption, and I can view a lot of information of encryption as following URL,
    (http://www.oracle.com/technology/deploy/security/db_security/transparent-data-encryption/index.html)
    Anyway. I 'm wondering about encrytion methods as following,
    1) OBFUSCATION or DBMS_CRYPTO can support IV(Initial Vector)?
    2) DBMS_CRYPTO can support encrypting indexed data?
    I knew that OBFUSCATION cannot support encrypting indexed data
    (ref. Database Encryption in Oracle9i - oracle technical white paper, Feb, 2001)
    Any answers are appreciated.
    Thanks.

    nn2000 wrote:
    I know it moves to the next, that's the problem. any fixing solution?If only there were some way you could call it once and "remember" or store the result of that call to next()... (hint, hint)

  • OpenSSL bf-cbc encrypted Keyfile HOOK for LUKS

    I modified the this HOOK that maxim_ posted here. That dose not work.
    https://bbs.archlinux.org/viewtopic.php … 05#p947805
    This one uses Blowfish in CBC mode instead of AES-256.
    The password is hashed 1000 times with Whirlpool.
    gen-cryptkey adds a a Salt to the encrypted keyfile
    https://github.com/tdwyer/bfkeyfile
    /lib/initcpio/hooks
    #!/usr/bin/ash
    run_hook ()
    local encfile decfile iteration attempts prompt badpassword dev arg1 arg2 retcode password passwordHash
    if [ "x${bfkf}" != "x" ]; then
    encfile="/enc_keyfile.bin"
    decfile="/crypto_keyfile.bin"
    iteration=1000
    attempts=5
    prompt="Enter password: "
    badpassword="Password incorrect"
    dev="$(echo "${bfkf}" | cut -d: -f1)"
    arg1="$(echo "${bfkf}" | cut -d: -f2)"
    arg2="$(echo "${bfkf}" | cut -d: -f3)"
    if poll_device "${dev}" "${rootdelay}"; then
    case "${arg1}" in
    *[!0-9]*)
    mkdir /mntkey
    mount -r -t "${arg1}" "${dev}" /mntkey
    dd if="/mntkey/${arg2}" of="${encfile}" >/dev/null 2>&1
    umount /mntkey
    rm -rf /mntkey
    dd if="${dev}" of="${encfile}" bs=1 skip="${arg1}" count="${arg2}" >/dev/null 2>&1
    esac
    fi
    if [ -f "${encfile}" ]; then
    while true; do
    read -rsp "${prompt}" password
    i=0
    while [ ${i} -lt ${iteration} ]; do
    password=`echo -n "${password}" | openssl dgst -whirlpool -hex 2> /dev/null | cut -d ' ' -f 2`
    i=$(( ${i} + 1 ))
    done
    openssl bf-cbc -pass pass:"${password}" -d -in "${encfile}" -out "${decfile}" >/dev/null 2>&1
    retcode="$?"
    if [ "${retcode}" != "0" ]; then
    echo -e "\n${badpassword}\n"
    attempts=$(( ${attempts} - 1 ))
    [ "${attempts}" == "0" ] && echo "Keyfile could not be decrypted" && break
    else
    break
    fi
    done
    rm -f "${encfile}"
    else
    echo "Encrypted keyfile could not be opened. Reverting to 'encrypt' hook."
    fi
    fi
    /lib/initcpio/install
    #!/bin/bash
    build() {
    add_binary /usr/bin/openssl
    add_runscript
    help ()
    cat<<HELPEOF
    This hook allows for an openssl (bf-cbc) encrypted keyfile for LUKS.
    It relies on standard 'encrypt' hook providing decrypted '/crypto_keyfile.bin' for it.
    You must use gen-cryptkey create the encrypted enc_keyfile.bin
    The password is hashed with Whirlpool 1000 times
    Then your password Hash is used to encrypt the keyfile
    mkinitcpio.conf:
    MODULES: add ext4 vfat or whatever the type of filesystem the keyfile is on
    HOOKS=" ... bfkf encrypt ... filesystems ..."
    Kernel Parameters:
    There is no need for cryptkey=
    Two options are supported:
    1) Using a file on the device:
    bfkf=<device>:<fs-type>:<path>
    2) Reading raw data from the block device:
    bfkf=<device>:<offset>:<size>
    Example: /etc/default/grub
    GRUB_CMDLINE_LINUX="bfkf=/dev/sdb1:ext4:/keyfile.bin cryptdevice=/dev/sda2:root"
    HELPEOF
    # vim: set ft=sh ts=4 sw=4 et:
    /usr/bin/gen-cryptkey
    #!/bin/bash
    # GPLv3
    # Thomas Dwyer
    # tomd.tel
    iteration=1000
    create_msg='Create: gen-cryptkey create'
    decrypt_msg='Decrypt: gen-cryptkey decrypt PATH_TO_KEYFILE'
    main () {
    action=$1
    if [ -z $action ]; then
    echo -e "Usage:\n$create_msg\n$decrypt_msg"
    elif [ $action == "create" ]; then
    crypt
    elif [ $action == "decrypt" ]; then
    if [ -z $2 ]; then
    echo -e "Usage:\n$create_msg\n$decrypt_msg"
    else
    decrypt $2
    fi
    else
    echo -e "Usage:\n$create_msg\n$decrypt_msg"
    fi
    exit 0
    crypt () {
    encfile="enc_keyfile.bin"
    echo "$encfile encrypted keyfile will be created"
    echo ''
    read -rsp "Enter password: " password
    password1=`echo -n "$password" | openssl dgst -whirlpool -hex | cut -d ' ' -f 2`
    echo ''
    read -rsp "Enter password Again: " verify
    password2=`echo -n "$verify" | openssl dgst -whirlpool -hex | cut -d ' ' -f 2`
    if [[ "$password1" == "$password2" ]]; then
    for (( i=1; i<=$iteration; i++ )); do
    password=`echo -n "$password" | openssl dgst -whirlpool -hex | cut -d ' ' -f 2`
    done
    dd if=/dev/urandom bs=1k count=256 | openssl bf-cbc -pass pass:"${password}" -salt -out "${encfile}"
    else
    echo "Passwords did not match"
    fi
    decrypt () {
    encfile=$1
    decfile="crypto_keyfile.bin"
    echo "$encfile Will be decrypted to crypto_keyfile.bin"
    echo ''
    read -rsp "Enter password: " password
    for (( i=1; i<=$iteration; i++ )); do
    password=`echo -n "$password" | openssl dgst -whirlpool -hex | cut -d ' ' -f 2`
    done
    openssl bf-cbc -pass pass:"${password}" -d -in "${encfile}" -out "${decfile}"
    main $@
    Last edited by hunterthomson (2013-01-01 00:01:20)

    Well, it is working now, so feel free to use it.
    If you do use it, make darn sure to keep "at least" 3 backups of the keyfile on 3 different devices.
    You will also want to leave your passphrase enabled until you are sure the keyfile is working as it should.
    However, I am not going to use this anymore and will no longer be working on it. I will subscribe to this thread and answer any questions. I don't really see a whole lot of added security in this, and it would be kind of a pain to use a keyfile in a Live CD/USB. I think it is good enough to make use of the --iter-time flag when using luksFormat or luksAddKey.  It was a fun ride learning how to write this hook for initcpio
    Note: Anyone who wants to write a hook should install busybox and symlink /usr/local/bin/ash to it for testing the HOOK script. The HOOKS use busybox ash not 'sh' nor 'bash', and ash is strange. If your HOOK script has an error you will get a kernel panic.
    Last edited by hunterthomson (2012-12-31 23:57:24)

  • Encrypting using DSA

    Hi,
    I want to encrypt plaintext using any assymetric key algo like DSA using some Java security or crypto classes. Since Cipher class can be used only in case of symmetric key algos like DES, I cannot use that. Can anyone please help me on what to do??
    Thanks,
    Gundeep

    Gundeep,
    DSA cannot be used for encryption, it can only be used for digital signatures.
    I think it's only a kind of MAC of the Hash-Value.
    Regards
    Torsten

  • Exporting to PDF - How Can I Get A Small File Size When Using Lots of Vector Art?

    I am trying to create a small PDF file for e-book distribution purposes. My Indesign pages contain a variety of photographs, vector icons and vector maps.
    A publisher in Britain who does similar books on a Mac using Creative Suite was able to create a 22-page document very similar to mine (similar icons, graphics, density, etc) that is only 2.84 mb, a small fraction of the file size that I'm getting! I've included a sample page of his below, which is a low-res jpeg, but on the original PDF all of the text and images (except the jpeg cliff background) are super sharp - they look like vectors when you zoom in. I've also included screenshots of his PDF export settings.
    I don't know if he's exporting directly out of Indesign, but my best guess is that he is.
    My vector-based icons, numbers and maps are bloating my PDFs considerably. When I remove them, the Indesign and exported PDF file sizes drop dramatically. For the life of me, I can't figure out how he got such small PDF files sizes using so much vector art! The PDF graphic compression settings don't seem to include any options for vector art.
    My vector art graphics (numbering, icons, maps) are all saved as Illustrator AI files and then placed in Indesign as linked graphics. My best guess as to why I can't achieve smaller PDF files is I'm either doing something wrong with the vector graphics themselves or handling/exporting them improperly out of Indesign.
    I am using CS4 for PC and am on a Dell Machine running Windows 7.

    I am trying to create a small PDF file for e-book distribution purposes. My Indesign pages contain a variety of photographs, vector icons and vector maps.
    A publisher in Britain who does similar books on a Mac using Creative Suite was able to create a 22-page document very similar to mine (similar icons, graphics, density, etc) that is only 2.84 mb, a small fraction of the file size that I'm getting! I've included a sample page of his below, which is a low-res jpeg, but on the original PDF all of the text and images (except the jpeg cliff background) are super sharp - they look like vectors when you zoom in. I've also included screenshots of his PDF export settings.
    I don't know if he's exporting directly out of Indesign, but my best guess is that he is.
    My vector-based icons, numbers and maps are bloating my PDFs considerably. When I remove them, the Indesign and exported PDF file sizes drop dramatically. For the life of me, I can't figure out how he got such small PDF files sizes using so much vector art! The PDF graphic compression settings don't seem to include any options for vector art.
    My vector art graphics (numbering, icons, maps) are all saved as Illustrator AI files and then placed in Indesign as linked graphics. My best guess as to why I can't achieve smaller PDF files is I'm either doing something wrong with the vector graphics themselves or handling/exporting them improperly out of Indesign.
    I am using CS4 for PC and am on a Dell Machine running Windows 7.

Maybe you are looking for