DES with actual 7 byte key Do we have any library or any mechanism where we can use true 7 byte key for DES instead of 8 byte key. I need it for keys analysis in DES and 8 byte key requirement for associated library is creating problem in getting actual keys analysis.
You need to split up your key into eight 7 bit pieces, and put these 7 bits into a byte each. The parity is in the least significant bit on most platforms, so the 7 bits need to go into the most significant bits. Of course, as the key is probably in bytes, you need to shift and combine the values in the bytes to retrieve the 7 bits.

It's possible the library does not require the parity bits to be set. In that case you don't need to calculate the parity. Otherwise you simply create the parity once you've got the 8 bytes.

Following code is in Java (which makes it a bit awkward because Java bytes are signed and most calculations assume integers).

// --- create 64 bit key from 56 bit key
// least significant bit can have any value
key64[0] = (byte) (key56[0] &amp; 0xFE); // &lt;&lt; 0
key64[1] = (byte) ((key56[0] &lt;&lt; 7) | ((key56[1] &amp; 0xFF) &gt;&gt;&gt; 1));
key64[2] = (byte) ((key56[1] &lt;&lt; 6) | ((key56[2] &amp; 0xFF) &gt;&gt;&gt; 2));
key64[3] = (byte) ((key56[2] &lt;&lt; 5) | ((key56[3] &amp; 0xFF) &gt;&gt;&gt; 3));
key64[4] = (byte) ((key56[3] &lt;&lt; 4) | ((key56[4] &amp; 0xFF) &gt;&gt;&gt; 4));
key64[5] = (byte) ((key56[4] &lt;&lt; 3) | ((key56[5] &amp; 0xFF) &gt;&gt;&gt; 5));
key64[6] = (byte) ((key56[5] &lt;&lt; 2) | ((key56[6] &amp; 0xFF) &gt;&gt;&gt; 6));
key64[7] = (byte) (key56[6] &lt;&lt; 1);

// --- set parity in time independent of the values within key64
for (int i = 0; i &lt; key64.length; i++) {
    // if even # bits, make uneven, take last bit of count so XOR with 1
    // for uneven # bits, make even, take last bit of count so XOR with 0  
    key64[i] ^= Integer.bitCount(key64[i] ^ 1) &amp; 1;
}