diff --git a/pgpainless-core/src/main/kotlin/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.kt b/pgpainless-core/src/main/kotlin/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.kt
index bd24b245..dd77207c 100644
--- a/pgpainless-core/src/main/kotlin/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.kt
+++ b/pgpainless-core/src/main/kotlin/org/pgpainless/decryption_verification/OpenPgpMessageInputStream.kt
@@ -5,6 +5,7 @@
 package org.pgpainless.decryption_verification
 
 import java.io.EOFException
+import java.io.FilterInputStream
 import java.io.IOException
 import java.io.InputStream
 import java.io.OutputStream
@@ -18,6 +19,7 @@ import org.bouncycastle.openpgp.PGPCompressedData
 import org.bouncycastle.openpgp.PGPEncryptedData
 import org.bouncycastle.openpgp.PGPEncryptedDataList
 import org.bouncycastle.openpgp.PGPException
+import org.bouncycastle.openpgp.PGPLiteralData
 import org.bouncycastle.openpgp.PGPOnePassSignature
 import org.bouncycastle.openpgp.PGPPBEEncryptedData
 import org.bouncycastle.openpgp.PGPPrivateKey
diff --git a/pgpainless-core/src/test/kotlin/org/pgpainless/decryption_verification/CRLFInputStreamTest.kt b/pgpainless-core/src/test/kotlin/org/pgpainless/decryption_verification/CRLFInputStreamTest.kt
new file mode 100644
index 00000000..f078bb2c
--- /dev/null
+++ b/pgpainless-core/src/test/kotlin/org/pgpainless/decryption_verification/CRLFInputStreamTest.kt
@@ -0,0 +1,29 @@
+package org.pgpainless.decryption_verification
+
+import org.bouncycastle.util.io.Streams
+import org.junit.jupiter.api.Assertions.assertArrayEquals
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.Test
+
+class CRLFInputStreamTest {
+
+    @Test
+    fun readRNOneByOne() {
+        val bIn = "a\r\nb".byteInputStream()
+        val crlfIn = OpenPgpMessageInputStream.CRLFInputStream(bIn)
+
+        assertEquals('a'.code, crlfIn.read())
+        assertEquals('\n'.code, crlfIn.read())
+        assertEquals('b'.code, crlfIn.read())
+        assertEquals(-1, crlfIn.read())
+    }
+
+    @Test
+    fun readRNAtOnce() {
+        val bIn = "a\r\nb".byteInputStream()
+        val crlfIn = OpenPgpMessageInputStream.CRLFInputStream(bIn)
+
+        val bytes = Streams.readAll(crlfIn)
+        assertArrayEquals("a\nb".toByteArray(), bytes)
+    }
+}