mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 04:56:03 +03:00
[GH-ISSUE #43] "stream" attachments to the SMTP server on send #37
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jasonmunro on GitHub (Mar 8, 2016).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/43
Originally assigned to: @jasonmunro on GitHub.
Currently we read attachments into memory to format them to be sent. We need to do this one line at a time so we don't overflow available memory with larger attachments.
@jasonmunro commented on GitHub (Jun 21, 2016):
One issue here is we currently encrypt the attachment while it rests on the server between upload and send. If we stream these (which we should), we have to do something like line by line encryption, which presents it's own set of problems.
@dumblob commented on GitHub (Jun 21, 2016):
Well, I think we shouldn't be focused on lines, because no devices nowadays use text protocols, but rather some packets to send data over the network (not considering circuit networks which are very rarely used for plain data nowadays). I would take the maximum TCP packet payload size which causes no fragmentation (for the whole Ethernet frame it's 1492 octets in case of PPPoE/DSL, 1500 octets otherwise; after removing Ethernet frame 24 octets, IPv4 header 20 octets, and TCP header 20 octets, we'll end up with payload 1492 - 24 - 20 - 20 = 1428 octets) and split the data according to this size. Of course, not everybody is using Ethernet-based connection, but this one is most prevalent and will cover 99.999% of users of Cypht in my opinion.
In general I would avoid small pieces of data (like lines in an email), because the packet size grows (in IPv6 it's 65535 octets) and devices will try not to fragment those. It is also inefficient to cipher small pieces of data, because it involves more copying and shuffling with meta data.
For ciphering the most suitable would be of course a block cipher mode of operation of an existing cipher of your choice.
@marclaporte commented on GitHub (Jul 31, 2022):
Related:
https://github.com/jasonmunro/cypht/issues/351
https://github.com/jasonmunro/cypht/issues/469