Last Updated
Viewed 10 Times
           

I am trying to parse some values coming from a TCP connection, coming from an android Application.

A value, I managed to receive from that TCP, and would like to find out how it was encrypted is:

'G1÷ù]TB*ø5£"ñB—£s∏f
'1÷ù]

Can anyone help me with finding the original value of this, or at least which technology was used to get this result?

Similar Question 1 : PHP Variable Encryption

I have the following code that creates an encryption in PHP:

$password = "helloworld";
$passwordupper = strtoupper($password);
$passwordencode = mb_convert_encoding($passwordupper, 'UTF-16LE');
$passwordsha1 = hash("SHA1", $passwordencode);
$passwordbase64 = base64_encode($passwordsha1);

The instructions I have from the system I'm trying to connect to states:

The encoding process for passwords is: first convert to uppercase, then Unicode it in little-endian UTF 16, then SHA1 it then base64 encode it.

I think I'm doing something wrong in my code. Any ideas?

Someone is asking my client to execute a script on their server. Although the person is trusted but they are trying to hide what the script is actually doing. This might be a Python, Bash or Ruby script. Here are the first few lines:

ELF����������>����¯&@�����@�������������������@�8��@���������������������@�������@�����‚.������‚.�������� �����������0������0å`�����0å`����������������������������QÂtd��������������������������������������������������ò¶l?���!Ù
����Pë��Pë��8��¿������˚˚!ˇELF��>�
@@ªdø�êâ"8�›≤Óª ��'@‰Ñ<!¯��‰{õÓ8
@ôê'��|`{oçLO�~…∂Ñ� 7´]œN»˜
`†7@.wr!^$ÉM»`fl§õ2T@ôê'D��PÂÚΩfltd¨E
@‰gK»�7Qßg∞#∞�oRf  ø��ÄÑá@��ˇM��w��I�€ª˝/lib64d-nux-x86-.˜¶€˛so.2���GNU��öœ4› ˜ˇˇAÙ6«[9ÅGüa¢ÂH#∞   ÔÌ/ÿ8C7à¡ 
@ˇˇo∫:=BE’Ϫ„í|∏çÒ8ÚãŸqX∞n ˚ΔÔ��™PÑ] ≈�˙/!Ï9ne_¬Üê›uGçê!lÛ¬ÜÃèñÜ∞!l//fßÏd¬èΩõ¬Üê!F∞/rl_
!C»±£»6ÑwD_ÜB.êCÅS!l!/\ á∞/ïîß2Ñào6Ñ`G(K_aC»m/6Ñ
YwY_
........................

How can I determine the encryption method for this file? I want to decode it before advising the client to execute it even if the provider is trusted one. The client wants to know exactly what does this script do. Without knowing the encryption method, we can't decode it and the provider is reluctant to share the encryption method.

Here is my code so far. I need to run the encode part of the code 5 times and then decode the encode the same number of times. I figured out how to encode the message but now I can't figure out how to run the "encode" or "decode" variable back through the code to strengthen the ecryption.

public class Codes
    {
        /**
         * Encode and decode a message using a key of values stored in
         * a queue.
         */
        public static void main(String[] args)
        { 
            int[] key = {7, 6, 5, 2, 8, 5, 8, 6, 4, 1};
            Integer keyValue;
            String encoded = "", decoded = "";
            String message = "Queues are useful for encoding messages.";
            Queue<Integer> encodingQueue = new LinkedList<Integer>();
            Queue<Integer> decodingQueue = new LinkedList<Integer>();

            // load key queues 
            for (int scan = 0; scan < key.length; scan++)
            {
                encodingQueue.add(key[scan]);
                decodingQueue.add(key[scan]);
            }

            // encode message
            for (int scan = 0; scan < message.length(); scan++)
            {
                keyValue = encodingQueue.remove();
                encoded += (char) (message.charAt(scan) + keyValue);
                encodingQueue.add(keyValue);
            }

            System.out.println ("Encoded Message:\n" + encoded + "\n");


            // decode message 
            for (int scan = 0; scan < encoded.length(); scan++)
            {
                keyValue = decodingQueue.remove();
                decoded += (char) (encoded.charAt(scan) - keyValue);
                decodingQueue.add(keyValue);
            }

            System.out.println ("Decoded Message:\n" + decoded);
        }


    }

as of right now I am receiving this output:

Encoded Message:
X{jwmx(gvf'{xgnzt&jpy&jpktlorh'sju{fokw/

Decoded Message:
Queues are useful for encoding messages.

In order to complete this program I need the output to look like this:

Encoded Message 1: X{jwmx(gvf'{xgnzt&jpy&jpktlorh'sju{fokw/ 
Encoded Message 2: _?oyu}0mzg.?}iv•|,nq?,orsytuvi.yow?kwq{0 
Encoded Message 3: f?t{}?8s~h5??k~??2rr?2tt{~|{zj5•ty?p•w•1 
Encoded Message 4: m?y}??@y?i<??m???8vs?8yv????~k<?y{?u?}?2 
Encoded Message 5: t?~•??H•?jC??o???>zt?>~x?????lC?~}?z???3 
Decoded Message 5: m?y}??@y?i<??m???8vs?8yv????~k<?y{?u?}?2 
Decoded Message 4: f?t{}?8s~h5??k~??2rr?2tt{~|{zj5•ty?p•w•1 
Decoded Message 3: _?oyu}0mzg.?}iv•|,nq?,orsytuvi.yow?kwq{0 
Decoded Message 2: X{jwmx(gvf'{xgnzt&jpy&jpktlorh'sju{fokw/ 
Decoded Message 1: Queues are useful for encoding messages.

I estimate that in order to make this happen I need to use a loop to run the "encode" and "decode" variables back through the program. However I cannot figure out how to make that happen.

Similar Question 7 (2 solutions) : 3DES Encryption result different from example

Similar Question 9 (1 solutions) : Php Encryption Result

cc