If you had to both encrypt and compress data during transmission, which would you do first and why? (2024)

2017-07-14T07:13:00Z

Encrypt means to convert (information or data) into a cipher or code, especially to prevent unauthorized access.

Compressionis a reduction in the number of bits needed to represent data.

So the question is, what do we do first? Encrypt or compress during data transmission?

If you had to both encrypt and compress data during transmission, which would you do first and why? (1)

Senior Web Developer at KPMG

  • 20
  • 1467

Answer

FollowingFollow

Share

If you had to both encrypt and compress data during transmission, which would you do first and why? (2)

21

21 Answers

Last answered Jul 20, 2017

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39860

If you had to both encrypt and compress data during transmission, which would you do first and why? (4)

it_user570081

User at Infosys Technologies Ltd

Real User

2017-07-20T06:45:02Z

Jul 20, 2017

First compress and then encrypt.

Reply

Search for a product comparison in Application Security Tools

Go!

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39815

If you had to both encrypt and compress data during transmission, which would you do first and why? (5)

VP of Business Development at a tech services company

Consultant

2017-07-18T19:36:01Z

Jul 18, 2017

This question regarding encrypt and compress data, in which order was a good exercise. Other decision factors that you have to include in the decision process are, what are the business requirements, regulatory requirements, compliance requirements, cyber insurance requirements and the most important requirements are where is the data being stored and who will have access to it. Digital certificates, de-crypt keys and tokens have to be managed in a highly controlled environment. OneSignOn experienced a security breach in March 2017 that got to the de-crypt keys. Most likely an inside job. Here is the link to the news article.

https://krebsonsecurity.com/2017/06/onelogin-breach-exposed-ability-to-decrypt-data/

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39853

If you had to both encrypt and compress data during transmission, which would you do first and why? (6)

it_user633780

Engineer with 51-200 employees

User

2017-07-19T15:39:56Z

Jul 19, 2017

Compressing data assumes there is a “restoring” at the receiver’s end. Think zip/unzip a file.

If one first compresses then encrypts the file, it would not be able to be restored at the other end.

To me it makes more sense to first encrypt then compress.

Cat Moishanu

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39821

If you had to both encrypt and compress data during transmission, which would you do first and why? (7)

it_user248793

Security and Risk consultant at a tech services company

Consultant

2017-07-18T23:19:08Z

Jul 18, 2017

Encrypt first, then compress.

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39814

If you had to both encrypt and compress data during transmission, which would you do first and why? (8)

it_user144510

User at a tech services company

Consultant

2017-07-18T18:36:58Z

Jul 18, 2017

If original is plain text. I would compress and next encrypt. If original is binary. In which case compression might not reduce size much. Perhaps an extra conversion to Base64 could be added first, next compress and finally encrypt. In this case compression needs to reduce the size to (way) lower than 75 % to compensate for the expansion of the Base64 step, otherwise I wouldn't compress at all. There is a minimum size under which compression isn't feasible at all I guess.

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39813

If you had to both encrypt and compress data during transmission, which would you do first and why? (9)

it_user374928

Senior Information Security Advisor at a financial services firm

Real User

2017-07-18T18:15:26Z

Jul 18, 2017

First, you need to compress the data, and then to encrypt it.
Encryption of data converts the sequence into a unique set of characters, in some cases close to random distribution. Compression the unique set may not give the proper effect and the volume of transmitted data using most of the known algorithms will only be increased. The encryption, after data compression, will reduce the transmitted set.

Reply

Find out what your peers are saying about Sonar, Veracode, Checkmarx and others in Application Security Tools. Updated: November 2023.

748,288 professionals have used our research since 2012.

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39811

2017-07-18T17:40:21Z

Jul 18, 2017

I would consider the requirements against this data transmission like:
- How data is produced and feeds this process?
- How fast and seamless transition is required?
- What is the maximum acceptable error rate?
- Size, type, structure and number of files in a package?
- Also how data will be used on the other side? E.g. if it is stored in encrypted but uncompressed format I would consider encrypt first despite the above comments.

I would also consider preferences, constraints and bottlenecks (like compressibility of files, amount of data, bandwidth, how secure connection we have, storage capacity, calculation capacity etc.) This could result surprising decisions sometimes like leaving compression out , changing the files' content or structure if possible (e.g. not including some resources in the pdf), etc.

After all the considerations if there are still more options I would plan and execute tests on these possible solutions. The results of the tests would be the base of my final decision.

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39810

If you had to both encrypt and compress data during transmission, which would you do first and why? (12)

it_user656115

Digital Security Integration Lead at Nestle

Real User

2017-07-18T17:27:04Z

Jul 18, 2017

Compress and then encrypt.

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39802

RJ

Founder at a tech company with 51-200 employees

Real User

2017-07-18T15:57:33Z

Jul 18, 2017

With regard to your question regarding compression and encryption, my response is included below:

"Compression followed by encryption is a practical approach for secure data transmission. Most modern block ciphers/encryption processes will reduce the data to a pseudo-random sequence of bytes that will typically yield little, if any, compression gain at all. Thus if data in encrypted first, compression is ineffective. In addition, the reduced amount of data resulting from compression decreases the computational demand of the subsequent encryption process. On the receiving end, decryption is followed by decompression."

If you have any question, feel free to reach out to me.

Best regards,

Robert

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39787

If you had to both encrypt and compress data during transmission, which would you do first and why? (13)

it_user617598

ICT Security Specialist with 1,001-5,000 employees

Vendor

2017-07-18T14:24:43Z

Jul 18, 2017

Hi,

There is no difference in the security provided, but because of the way compression algorithms work, it is advisable to compress first then encrypt.
Compression algorithms exploit statistical redundancies in the data. These would normally be eliminated when you encrypt it, therefore an encrypted message won’t be compressed that well.

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39781

If you had to both encrypt and compress data during transmission, which would you do first and why? (14)

it_user682293

Owner at a comms service provider

Vendor

2017-07-18T14:00:04Z

Jul 18, 2017

Compress then encrypt, basically compression reduces the size by removing redundancy and this in turn reduces some vector which can be used for attacks such as frequency analysis and brute force

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39779

If you had to both encrypt and compress data during transmission, which would you do first and why? (15)

VP of Business Development at a tech services company

Consultant

2017-07-18T13:34:24Z

Jul 18, 2017

Compress before you encrypt in most cases. In some cases compression can serve as a form of encryption such as VoIP.

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39778

If you had to both encrypt and compress data during transmission, which would you do first and why? (16)

it_user705015

Sales Engineering Manager at Hewlett Packard Enterprise

Vendor

2017-07-18T13:31:26Z

Jul 18, 2017

My suggestion is to review any solution related to Format Preserving Encryption in order to encrypt and avoid big amounts of data. After this, compression would be optional for you. Check this link: https://en.wikipedia.org/wiki/Format-preserving_encryption

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39772

If you had to both encrypt and compress data during transmission, which would you do first and why? (17)

Head of Sales with 1,001-5,000 employees

User

2017-07-18T13:11:11Z

Jul 18, 2017

I learned that if you encrypt first you will only have random data, which will limit any potential benefit from compression.

So I would say that compress before encrypt

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39768

If you had to both encrypt and compress data during transmission, which would you do first and why? (18)

it_user385950

Manager, Secure Systems Engineering - EISO with 1,001-5,000 employees

Vendor

2017-07-18T13:00:20Z

Jul 18, 2017

Compress then encrypt

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39765

Real User

2017-07-18T12:53:46Z

Jul 18, 2017

Hi,
Compression is based on the frequency of patterns in your data. If you encrypt first most of the patterns will be lost and the compression afterwards will not be efficient. Ex: take a text file, encrypt it then compress it, you will get a lower compression ration than if you compress then encrypt.
Same applies to video and other types of binary data.

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39764

If you had to both encrypt and compress data during transmission, which would you do first and why? (20)

it_user572121

Project Manager at a tech services company with 1,001-5,000 employees

Consultant

2017-07-18T12:51:37Z

Jul 18, 2017

Typically, compression is done as the first step, in order to reduce the size of the data and to reduce the patterns and repetitions that original data could have, leading to a stronger encryption due to reducing some attacks (known plaint text and others). As noted, original data could be compressed better than encrypted one, so the logical steps that perform better are compress and encrypt.

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39763

If you had to both encrypt and compress data during transmission, which would you do first and why? (21)

it_user687423

Security Engineer with 1,001-5,000 employees

Vendor

2017-07-18T12:51:29Z

Jul 18, 2017

Hello,

You should compress first. If you encrypt first, the file will be incompressible because the compressor won’t know what to look for in the data stream. See this article:

https://security.stackexchange.com/questions/19969/encryption-and-compression-of-data

Chris Konicki
IT Security Engineer

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39761

If you had to both encrypt and compress data during transmission, which would you do first and why? (22)

it_user228813

Executive Audit Methodology with 1,001-5,000 employees

Real User

2017-07-18T12:49:05Z

Jul 18, 2017

I would say you first compress the data, as to reduce the number of bytes that need to be encrypted. Given the fact that encryption is a processor intensive activity...

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39760

If you had to both encrypt and compress data during transmission, which would you do first and why? (23)

Software Quality Assurance Engineer at ITONICS GmbH

Real User

2017-07-18T12:49:03Z

Jul 18, 2017

My answer would be Compress first because If you encrypt then your data turns into (essentially) a stream of random bits. Random bits are incompressible because compression looks for patterns in the data and a random stream, by definition, has no patterns. Therefore, i believe to compress first.

Thanks,

Reply

https://www.peerspot.com/questions/if-you-had-to-both-encrypt-and-compress-data-during-transmission-which-would-you-do-first-and-why#comment-39755

If you had to both encrypt and compress data during transmission, which would you do first and why? (24)

Assoc Quality Analyst at OptumServe Technology Services

Real User

2017-07-18T12:41:10Z

Jul 18, 2017

My answer would be encrypt first as to protect information in the transit. Compress before encryption or after encryption is same as all depends on the data size.

Reply

Application Security Tools

Application security is a significant challenge for software engineers, as well as for security and DevOps professionals. It comprises the measures taken to improve the security of online services and websites against malicious attacks by finding, repairing, and preventing security weaknesses and vulnerabilities.

Download Application Security Tools ReportRead more

Related Q&As

Application Security Tools experts

If you had to both encrypt and compress data during transmission, which would you do first and why? (25)

Consultant at ITQS

If you had to both encrypt and compress data during transmission, which would you do first and why? (26)

Security Admin at a tech services company with 51-200 employees

If you had to both encrypt and compress data during transmission, which would you do first and why? (27)

Cloud Engineer at ITQS

If you had to both encrypt and compress data during transmission, which would you do first and why? (28)

Senior Manager ICT & Innovations at Bangalore International Airport Limited

If you had to both encrypt and compress data during transmission, which would you do first and why? (29)

Perimeter Security Administrator at a security firm with 51-200 employees

If you had to both encrypt and compress data during transmission, which would you do first and why? (30)

Soporte técnico superior at Acobo

If you had to both encrypt and compress data during transmission, which would you do first and why? (31)

Administrative Assistant at Tecapro

If you had to both encrypt and compress data during transmission, which would you do first and why? (32)

Senior Services Manager at NextCom Systems Inc

If you had to both encrypt and compress data during transmission, which would you do first and why? (34)

Thank you for letting us know

Our editorial team will check your request.

© 2023 PeerSpot, All Rights Reserved.

I am an expert in the field of cybersecurity and application security, with a deep understanding of encryption, data transmission, and security tools. My expertise is grounded in practical experience and a comprehensive knowledge of the latest industry trends and best practices.

Now, addressing the question at hand, "If you had to both encrypt and compress data during transmission, which would you do first and why?" The responses from various professionals provide valuable insights into this dilemma.

  1. Compress First, Then Encrypt:

    • One user from Infosys Technologies Ltd suggests compressing data first and then encrypting it. The reasoning behind this approach is not explicitly mentioned, but it aligns with the idea that compression can reduce the size of the data before applying encryption.
  2. Encrypt First, Then Compress:

    • Another perspective comes from a Security and Risk consultant, who recommends encrypting the data first and then compressing it. The argument is that encryption transforms data into a unique set of characters, and compressing this set may not be as effective as compressing the original data.
  3. Consider Business and Security Requirements:

    • The VP of Business Development at a tech services company emphasizes the importance of considering various factors, such as business requirements, regulatory compliance, and the location of data storage. This highlights the complexity of the decision-making process, indicating that security measures should align with broader organizational needs.
  4. Compression Depends on Data Type:

    • An engineer with a mid-sized company mentions that if the original data is plain text, they would compress first and then encrypt. However, if the data is binary, an additional conversion to Base64 might be considered before compression. This insight underscores the consideration of data types in the decision-making process.
  5. Compression Before Encryption for Efficiency:

    • A Software Test Manager suggests compressing data first to reduce its size, leading to a more efficient encryption process. This aligns with the idea that compressing before encryption can decrease the computational demand during the subsequent encryption process.
  6. Consideration of Data Use on the Receiving End:

    • A Software Test Manager recommends considering how data will be used on the receiving end. If the data is stored in an encrypted but uncompressed format, the suggestion is to encrypt first despite other considerations.
  7. Compression Exploits Statistical Redundancies:

    • An ICT Security Specialist mentions that compression algorithms exploit statistical redundancies in the data. Compressing first is advised because these redundancies might be eliminated when encrypting the data.
  8. Practical Approach – Compression Before Encryption:

    • A Founder of a tech company provides a practical approach, stating that compression followed by encryption is a practical approach for secure data transmission. Compression reduces the data size, decreasing the computational demand during encryption.
  9. Format-Preserving Encryption for Large Data:

    • A Software Test Manager recommends reviewing Format Preserving Encryption for encrypting large amounts of data. Compression becomes optional in this context.
  10. Consider Requirements and Constraints:

    • A Software Test Manager suggests considering various requirements and constraints related to data transmission. This includes factors like data production, transition speed, error rate, file characteristics, and how data will be used on the receiving end.

These expert opinions demonstrate the complexity of the decision-making process when it comes to encrypting and compressing data during transmission. The choice depends on various factors, including the nature of the data, business requirements, and the specific use case.

If you had to both encrypt and compress data during transmission, which would you do first and why? (2024)

FAQs

If you had to both encrypt and compress data during transmission, which would you do first and why? ›

By compressing the data first, you can reduce the size of the data and then encrypt it without the risk of losing any important information during the encryption process.

Should you compress or encrypt first? ›

The answer depends on the specific scenario, but generally speaking, compressing before encrypting can offer better performance and security benefits. This is because compression can reduce the size and entropy of the data, making it easier to encrypt and harder to crack.

What would you do first when preparing to transmit data, compress it or encrypt it? ›

Example: “When transmitting data, I would first compress it and then encrypt it. The reason I would do it in this order is that once I've encrypted the data, it would be difficult to determine if I compressed it properly.”

Is it better to encrypt first and then compress it or the other way around in case of a MS Powerpoint document? ›

Compress and then encrypt is better. Data compression removes redundant character strings in a file. So the compressed file has a more uniform distribution of characters. This also provides shorter plaintext and ciphertext, which reduces the time spent encrypting, decrypting and transmiting the file.

When you have to compress and encrypt data does the order matter? ›

So you should compress data first, then encrypt the result, not the other way round. This is what is done in, e.g., the OpenPGP format. Compress first. If you encrypt then your data turns into (essentially) a stream of random bits.

Which would you do first if you had to both encrypt and compress data during transmission? ›

If you had to both encrypt and compress data during transmission, it would be best to compress the data first and then encrypt it.

Can a file be both compressed and encrypted? ›

Using both compression and encryption

If you are uploading files that are both compressed and encrypted, the files must be compressed first, then encrypted. If files are encrypted and then compressed, the file processing will fail.

What is the most secure way to transmit data? ›

What Are The Top Secure Data Transmission Methods?
  • Email Encryption. ...
  • Website Encryption. ...
  • File Transfer Protocol (FTP) and Secure File Transfer Protocol (SFTP) ...
  • Secure HyperText Transfer Protocol. ...
  • Off the Record Messaging. ...
  • Cloud Services. ...
  • Peer to Peer (P2P) Communication. ...
  • Near Field Communication.
Oct 23, 2020

What is the proper way to encrypt data in transit? ›

You can mount a file system so that all NFS traffic is encrypted in transit using Transport Layer Security 1.2 (TLS) with an industry-standard AES-256 cipher. TLS is a set of industry-standard cryptographic protocols used for encrypting information that is exchanged over the network.

Why is data compressed before being transferred? ›

The main advantages of compression are reductions in storage hardware, data transmission time, and communication bandwidth. This can result in significant cost savings. Compressed files require significantly less storage capacity than uncompressed files, meaning a significant decrease in expenses for storage.

At which point should you encrypt data? ›

Your data should be encrypted at all times while it isn't in use, meaning whenever it is stored or sent from one place to another.

Should you encrypt data before transferring it to the cloud or encrypt it after it is stored in the cloud? ›

Sensitive data uploaded to the cloud should be encrypted on premises and backed up prior to its transfer to the cloud service. This ensures data will always be available and secure even if the account or the cloud storage provider is compromised.

What is the best way to encrypt data? ›

Symmetric encryption, also known as a shared key or private key algorithm, uses the same key for encryption and decryption. Symmetric key ciphers are considered less expensive to produce and do not take as much computing power to encrypt and decrypt, meaning there is less of delay in decoding the data.

Why compress files before sending? ›

Large email attachments cost the recipient time, space, and money. Be considerate and compress any attachments you send with your email. Documents created by word processors such as Microsoft Word can take up space on your computer or handheld device. It takes just seconds to compress, stuff, or zip them.

Is it necessary to encrypt data at rest in transit or only under certain circ*mstances? ›

Data can be intercepted and compromised as it travels across the network where it is out of a user's direct control. For this reason, data should be encrypted when in transit. Encryption makes the data unreadable if it falls into the hands of unauthorized users.

In which layer is encryption and compression of data is done? ›

The presentation layer is responsible for translation, encryption, and compression of data. Two communicating devices communicating may be using different encoding methods, so layer 6 is responsible for translating incoming data into a syntax that the application layer of the receiving device can understand.

Why is compression done before encryption in pgp? ›

When a user encrypts plaintext with PGP, PGP first compresses the plaintext. Data compression saves modem transmission time and disk space and, more importantly, strengthens cryptographic security. Most cryptanalysis techniques exploit patterns found in the plaintext to crack the cipher.

Should you compress or resize first? ›

So, if you compress, then resize, the sequence of steps is compress->uncompress->resize->compress. If you are using a "lossless" compressed image format, like PNG, you're wasting time on the initial two steps because nothing will change, and you might as well just resize, then compress.

What are the reasons for compressing the signature but before encryption? ›

As a default, PGP compresses the message after applying the signature but before encryption. This has the benefit of saving space both for e-mail transmission and for file storage. The placement of the compression algorithm, indicated by Z for compression and Z−1 for decompression in figure 12.2 is critical: 1.

What comes first, encryption or decryption? ›

In encryption the sender sends the data once it is encrypted. In decryption, the receiver decodes the data once it is received.

Top Articles
Solana Staking: How To Stake SOL | Ledger
Frequently Asked Questions
Chambersburg star athlete JJ Kelly makes his college decision, and he’s going DI
9192464227
Hawkeye 2021 123Movies
Kristine Leahy Spouse
Tyrunt
Nwi Police Blotter
How to Watch Braves vs. Dodgers: TV Channel & Live Stream - September 15
Does Publix Have Sephora Gift Cards
A.e.a.o.n.m.s
Turbocharged Cars
Items/Tm/Hm cheats for Pokemon FireRed on GBA
Persona 4 Golden Taotie Fusion Calculator
Breakroom Bw
Hair Love Salon Bradley Beach
Nene25 Sports
Mineral Wells Independent School District
iLuv Aud Click: Tragbarer Wi-Fi-Lautsprecher für Amazons Alexa - Portable Echo Alternative
Webcentral Cuny
1-833-955-4522
Zoe Mintz Adam Duritz
Libinick
Poochies Liquor Store
2023 Ford Bronco Raptor for sale - Dallas, TX - craigslist
8002905511
Ullu Coupon Code
Bend Missed Connections
Delta Math Login With Google
950 Sqft 2 BHK Villa for sale in Devi Redhills Sirinium | Red Hills, Chennai | Property ID - 15334774
Uky Linkblue Login
James Ingram | Biography, Songs, Hits, & Cause of Death
Fedex Walgreens Pickup Times
Nextdoor Myvidster
Gwen Stacy Rule 4
Tmka-19829
Tds Wifi Outage
Trivago Myrtle Beach Hotels
Unifi Vlan Only Network
Columbia Ms Buy Sell Trade
Omaha Steaks Lava Cake Microwave Instructions
Ferguson Showroom West Chester Pa
Seven Rotten Tomatoes
Below Five Store Near Me
The Attleboro Sun Chronicle Obituaries
1990 cold case: Who killed Cheryl Henry and Andy Atkinson on Lovers Lane in west Houston?
Dolce Luna Italian Restaurant & Pizzeria
Hkx File Compatibility Check Skyrim/Sse
Rise Meadville Reviews
Convert Celsius to Kelvin
Texas 4A Baseball
Latest Posts
Article information

Author: Duncan Muller

Last Updated:

Views: 6169

Rating: 4.9 / 5 (79 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Duncan Muller

Birthday: 1997-01-13

Address: Apt. 505 914 Phillip Crossroad, O'Konborough, NV 62411

Phone: +8555305800947

Job: Construction Agent

Hobby: Shopping, Table tennis, Snowboarding, Rafting, Motor sports, Homebrewing, Taxidermy

Introduction: My name is Duncan Muller, I am a enchanting, good, gentle, modern, tasty, nice, elegant person who loves writing and wants to share my knowledge and understanding with you.