Cryptography


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Cryptography
# 1  
Old 04-05-2008
Cryptography

Hi,

I have a file which contains 4 columns. I want to encrypt only the first column. The rest of data must be as it is.
flat file:

12234333 jakdjf 394839 343874
73746373 5jdkfdj 383993 958939
83473843 lksdjfj 388383 349399

so, 1 should be replace by 4, 2 with 8, 3 with 7.....
the output should effect only first column.
Please help me.
SmilieSmilie
# 2  
Old 04-05-2008
This kinda sounds like homework - your 'cryptography' is not cryptogrphy.
If this is for a real world application, somebody is giving you bad directions, IMO.
# 3  
Old 04-05-2008
It would probably be a good idea to take a brief moment to explain "why" and "do you know what you are doing", as usually one or the other of these two often turns out to be a problem when dealing with encryption.

You can of course encrypt anything you like, but it would help to know: do you need to be able to get it back (really!) and should it still be text-only.

Passwords are usually encrypted in such a way that they cannot be recovered -- all you can (or ever need to) do is encrypt another input string and compare; if they are the same, the user had the right password.

Should all the information be encrypted using a single passphrase, or do they need to be individual?

Have you been thinking about whether symmetric, secret-key encryption would suit your needs better, or asymmetric public-key encryption? Do you have a preference for any particular encryption algorithm or software?
# 4  
Old 04-07-2008
hi,
Thanks all for the reply.
I don't get back to the data, but i need the output in encrypted form.
As of business logic, i need to encrypt that column.
if anyone can help, it would be really great.
# 5  
Old 04-07-2008
Just do:
awk '{$1="secret";print}' file
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Need help in allowing symmetric cryptography[2]

The server that provides the time synchronization must be configured to allow its clients to verify its authenticity using symmetric cryptography. 4. Singapore Polytechnic, Dover, Singapore,Mr Kam, and Computer Engineering I don't think there is any coding since it is just configuring... (3 Replies)
Discussion started by: wilsonljx
3 Replies

2. Red Hat

Need help in allowing symmetric cryptography[2]

I have encountered some problems in my school work. Here is the question: The server that provides the time synchronization must be configured to allow its clients to verify its authenticity using symmetric cryptography. Much Appreciated!:) (1 Reply)
Discussion started by: wilsonljx
1 Replies

3. What is on Your Mind?

How To Analyze This (Cryptography Random?) Permutation...?

Hi to all of you guys, I'm new here... May this thread fits on this section. A friend of mine gave me this enigma to do, written in excel. I attach the file below, name New.xls. Enigma: There are 10^20 possibilities of tables (Table1, Table 2, Table 3, Table 4, Table 5,...), with ten rows (row... (3 Replies)
Discussion started by: lucky7
3 Replies

4. Cybersecurity

Firewalls and cryptography

As we know, firewall is designed to keep unauthorized outsiders from tampering with a computer system or network. We don't talk about computer security without cryptography. In this case, may I know,How does cryptographic protection (at the TCP/IP layers or at the application layer) affect a... (1 Reply)
Discussion started by: heroine
1 Replies
Login or Register to Ask a Question