There is no need for masks, to do what you want.
In AE, drag your jpeg to the “Make New Comp” button.
Go to: Effect > Channels > Invert.
Precompose the layer.
Add a black solid to the timeline, below your precomposed layer.
On the solid layer, set the track matte to “Luma Matte”.
Go to: Composition > Save Frame As > File.
In the Render Queue, set your output module to either PSD (photoshop) or TIF, Channels = “RGB+Alpha”, Color Depth = “Millions of Colors+”, Color = “Straight (Unmatted)”.
The resulting file will be your (black) logo, with an alpha channel. This file can now be used on any project for which your logo is required. The color of the logo is easily changed, using the “Tint” effect. It can also be scaled, to suit your project needs.