ok i found my bug, it was be not easy... I have a problem with functions CryptEncrypt CryptDecrypt http://msdn.microsoft.com/en-us/library/aa379924(v=VS.85).aspx i use secret key dwProvType := PROV_RSA_AES; dwAlgID := CALG_AES_256; dwSessionKeySize := 256; Very intresting that when encryptions data with size < 16 i don't have error, but if data size is >16 i will get error! If i use both of these functions in Windows or in Wine Ubuntu it's working without error. But if I Encrypt in Ubuntu and try Decrypt in Windows, CryptDecrypt get result error NTE_BAD_DATA. Can you test it ? Can you help me?