• Announcement: Lua.org now officially recommends this forum as a meeting place for the Lua community

Windows How can I make a drm in the Lua? (1 Viewer)

Sina Dehghani

Newcomer
Joined
Apr 14, 2021
Messages
2
Reaction score
0
Hello!
I am newbie ... So forgive me for my questions

Please and Please and Please Help me: How can I make a drm in the Autoplay Media Studio software? DRM is a special player for playing a movie in my own format, which I have to create a solution for encryption with a special format and a player to play it ...

If you do not know the method and algorithm in Autoplay Media Studio, Please explain the method and algorithm in Lua language ...

Autoplay Media Studio also has the ability to work with DLL. If you have DLL for this work, thank's you for sharing it.

Thank a lot Good Luck
 

dinsdale247

Moderator
Staff member
Community Patron
Creator of WinLua
Joined
Nov 17, 2020
Messages
93
Reaction score
34
Location
Victoria BC
Website
winlua.net
Hi,

I think you are asking about creating your own Digital Rights Management? But you also asked about encryption, which is something different (but related).

Both topics are very large and difficult. Not to mention the least of your issues: learning Lua and AMS. However, if you were just trying to protect some content, AMS seems to have some crypto libraries. I would suggest some form of cryptography to encrypt the files. Your plugin would use a "license file" that contains a key to unlock the content?

Anything I can suggest in one post is going to be pretty simplistic. You should probably ask on an AMS specific board and start learning about the crypto libraries they have available. I suspect someone using AMS has already thought this through.

Cheers.
 

Sina Dehghani

Newcomer
Joined
Apr 14, 2021
Messages
2
Reaction score
0
Hello
I know the methods of cryptography ... (For example, I know how to work with Bluetooth)
But in this method (encryption), the encrypted file must be resaved in one place, so that if the user gets this place, my file (movie) will be provided to the user without any difficulty! I do not want this!
I want my film to be encrypted with the playback so that the complete file cannot be found anywhere!
But or if this method does not work ...

If it is possible to create a special format such as MP4 (for example, video.lw) that can be played only inside my program ...

I have videos that are important to me that are not shared by others, so I do this ...


What can I do?
 

dinsdale247

Moderator
Staff member
Community Patron
Creator of WinLua
Joined
Nov 17, 2020
Messages
93
Reaction score
34
Location
Victoria BC
Website
winlua.net
I don't think it's necessary to create a new codec for the audio/video, I think you just want to encrypt the files and decrypt them in memory. Open the file in your plugin, pass the bytes to the encryption library, decrypt them in memory and pass the byte stream to the player?

Again, I'm unsure of the AMS interfaces so I don't know how files are loaded and whatnot. You probably also want to figure out your encryption method. If you're doing it in Lua, you need to find a Lua module (LuaRocks or Github) that have bindings to encryption libraries. You'll need to figure out which library you want to use. The encryption library will likely be in C so you will need to learn to compile it for theplatform you want.

So where would I start? I would start with AMS. Figure out the plugin system first and get a simple plugin working. Again, I would think someone has already figured this stuff out and there is an API of some sort.

Next figure out what encryption methods you are using. Pick a library like PGP or OpenSSL or something else (OpenSSL is a swiss army knife of encryption tools)? You will need to figure out if there are Lua bindings for the library you choose. I know that there are a number of Lua bindings to OpenSSL. Another encryption library called NaCL ("salt") looks really good: NaCl (software) - Wikipedia. Daniel J Bernstein is a verified genius and is a major advocate for the rights to good encryption. BUT, you might have to invent the Lua bindings to that.

So once you have your encryption library and bindings, your prototype would be a script that opens a file and "streams" (e.g. reads chunks of the file) and decrypts them. It's that stream of decrypted bytes that will be passed to AMS.

Does that help?
 
Top