Diclaimer
In the first place this is a recap on recent development activities. I am writing this down for lost souls - as I could not find any post containing this error except:
The Problem
During decryption of a cyphertext with a given private key, iOS throws this error:
Optional(Swift.Unmanaged<__C.CFErrorRef>(_value: Error Domain=NSOSStatusErrorDomain Code=-50 "RSAdecrypt wrong input (err -27)" UserInfo={numberOfErrorsDeep=0, NSDescription=RSAdecrypt wrong input (err -27)}))
For the sake of readability and search engine optimization the same error is given in a style which is more easy to be read:
Optional(
Swift.Unmanaged<__C.CFErrorRef>(
_value: Error
Domain=NSOSStatusErrorDomain
Code=-50 "RSAdecrypt wrong input (err -27)"
UserInfo={
numberOfErrorsDeep=0,
NSDescription=RSAdecrypt wrong input (err -27)
}
)
)
The Question
What are likely reasons for receiving this error?
However
My knowledge so far is given in one of the answers below ;-)