zvm | it goes zoom zoom - zvm goes zoom , like `` zoom zoom | SDK library
kandi X-RAY | zvm Summary
kandi X-RAY | zvm Summary
zvm goes zoom, like "zoom zoom".
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of zvm
zvm Key Features
zvm Examples and Code Snippets
Community Discussions
Trending Discussions on zvm
QUESTION
My understanding is that the original SMTP protocol was defined to limit transmission of characters using only 7 bits to save of transmission costs.
This protocol is almost 40 years old, and since then multiple RFCs have extended the standards.
For compatibility reasons, many if not most modern servers that are 8bit clean, perform a conversion of the message into a "7bit compatible" format, such as quoted-printable, or base64.
So technically, all the characters are 7bit ASCII.
However, the crux of my question is, even if data is encoded in a 7bit friendly way, does this mean that the physical transmission of bits between SMTP server occurs in 7bit units, or does it happen in 8bits?
My assumption is that it happens in 8bits, even if the data is encoded in ASCII. Is this correct?
Here are some relevant links I found:
<< Users send billions of 8-bit messages every year. As far as I know, all servers can handle 8-bit messages. A few years ago I was able to find a few hosts running ancient 7-bit versions of sendmail, but I don't see any now.>>
http://cr.yp.to/smtp/8bitmime.html
<< In practice, however, the body is typically encoded using all eight bits. >>
https://www.ibm.com/support/knowledgecenter/en/SSB27U_6.4.0/com.ibm.zvm.v640.kiml0/smtmlfr.htm
<< This does not cause problems in practice, since virtually all modern mail relays are 8-bit clean >>
https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol#8BITMIME
Update
The refinement of my question should be stated as: Do SMTP servers today still clear the high bit, and encode the 7bit ASCII using only the lower seven bits, or do they actually use the full octet, giving signinficance to the MSB?
...ANSWER
Answered 2020-Oct-17 at 12:47I think what you are asking is: "Do SMTP clients shift bits when sending messages to an SMTP server such that each character only uses 7 bits and the 8th bit is the start of the next character?"
If so, no. That has never been the case.
Since the very beginning, SMTP clients/servers have always used all 8 bits per character.
In other words, SMTP clients and servers used the ASCII character encoding which does not include accented characters that are found in 8bit character encodings such as ISO-8859-1. Characters with a value above 127 in the ASCII encoding are treated as undefined.
There are likely a number of reasons for this:
- ASCII is simple to support
- Every locale had their own preferred extended character encoding that was not compatible with other locales - some of which required more than a single byte to represent a character.
- I'm not sure if UTF-8 existed yet (but multibyte unicode did, I think - e.g. UCS2 / UTF-16)
- It was difficult and unrealistic to expect so much software to implement character set conversion between all of the widely used character sets (unicode and charset conversion libraries were not as widely available at the time)
- The "MESSAGE" specification that preceded MIME, SMTP, etc. was written for the US "internet" and likely didn't need anything outside of ASCII (hence why the original message specifications e.g. rfc0822 and earlier did not define encoding mechanisms).
QUESTION
I'm try to be compatible Encrypt/Decrypt both C# and Java.
As I know the default mode is 'ecb/pkcs5' in Java, and 'cbc/pkcs7' in C#.
So I match these things.
1st question is that PKCS7 and PKCS5 are compatible each other??,
there is no PKCS7 in Java so I use PKCS5. but I can get same encrypted data [even the padding-way is different ,pkcs7/pkcs5,] Is it possible? or these are compatible?
2nd question is that Why I get same result even though the mode, way are all different?
I compare 'DES-ECB / DES-CBC / TripleDES-ECB' these things. and C# is working well, results are all different.
Input > HELLO Output > (ECB)/dZf3gUY150= (CBC) V17s5QLzynM= (Triple)sWGS0GMe1jE
but I get same reulst in Java ..
Input > HELLO Output > (ECB)/dZf3gUY150= (CBC)/dZf3gUY150= (Triple)/dZf3gUY150=
When debugging the flow is right.
Here is my code.
C#
...ANSWER
Answered 2017-Apr-01 at 17:07PKCS7 and PKCS5 are compatible each other
PKCS#5 and PKCS#7 paddings are compatible (equal) for DES. For AES, Java actually uses PKCS#7 padding even though you would write AES/xyz/PKCS5Padding
.
Why I get same result even though the mode, way are all different?
First, let's see how Java behaves. The ciphertexts for DES-ECB, DES-CBC and DESede-ECB are all equal. This is correct if
- the key is the same (DES supports only 8 byte keys, but Triple DES supports 8, 16 and 24 byte keys where non-24 byte keys are expanded to 24 byte keys),
- the plaintext is the same,
- the plaintext is less than 8 bytes long (block size of DES/Triple DES) and
- the IV is an all 0x00 bytes IV.
Those are all true in the Java code. If you have trouble grasping that, combine the encryption routines for the ECB and CBC modes of operation.
The result of Triple DES might be a bit confusing. I assume that you've taken your 8 byte key for DES and replicated it either twice or thrice for use in Triple DES. This is an issue, because Triple DES encryption consists of three steps of normal DES: EDE means Encryption + Decryption + Encryption. If all the three subkeys are the same, the one of the Encryption steps cancels out with the Decryption step and the whole thing is equivalent to a single DES encryption.
Let's see why C# behaves differently:
The ciphertext from DES-CBC is different from DES-ECB, because the IV is not an all 0x00 bytes IV. cryptoProvider.CreateEncryptor(key, key)
creates an Encryptor with the IV set to key
(the second argument). That's not what you want. Just use cryptoProvider.CreateEncryptor()
instead.
The ciphertext from DESede-ECB is different from DES-ECB, because you're running the key through a hash function. The key is therefore different.
Don't use DES nowadays. It only provides 56 bit of security. AES would be a much better, because it's more secure with the lowest key size of 128 bit. There is also a practical limit on the maximum ciphertext size with DES. See Security comparison of 3DES and AES.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install zvm
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page