diff --git a/src/leap/soledad/client/_crypto.py b/src/leap/soledad/client/_crypto.py
index 873b82a8e0c225be50cec2bb80008c59d4ff5de0..90cfe45b94e9c5a5286e94a165b3b9eff38bac03 100644
--- a/src/leap/soledad/client/_crypto.py
+++ b/src/leap/soledad/client/_crypto.py
@@ -538,3 +538,13 @@ def _ceiling(size):
         step = 2 ** i
         if size < step:
             return step
+
+
+def get_unarmored_ciphertext_size(cleartext_size):
+    # used for blobs stream up (so we can tell the server how much data we are
+    # sending before starting to encrypt the stream)
+    PREAMBLE_SIZE = 736  # 552 urlsafe base64 encoded (it's always armored)
+    TAG_SIZE = 16
+    SEPARATOR_SIZE = 1
+    size = TAG_SIZE + PREAMBLE_SIZE + SEPARATOR_SIZE
+    return cleartext_size + size